]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1687971 - Make copy locations in the OPAC clickable.
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <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">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
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="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <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">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <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">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <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"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <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">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <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">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <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">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <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">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <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">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <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">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <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">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <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">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <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">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <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">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <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">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <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">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <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">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <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">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <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">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <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">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <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">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <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">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <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">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <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">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <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">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <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">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <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">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <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">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <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">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <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">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <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">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <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">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <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">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <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">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <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">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <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">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                 </fields>
1410                 <links>
1411                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1412                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1413                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1414                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1415                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1416                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1418                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1419                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1420                 </links>
1421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1422                         <actions>
1423                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1424                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                         </actions>
1428                 </permacrud>
1429         </class>
1430
1431         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1432                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1433                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1434                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1435                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1436                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1437                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1442                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1443                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1444                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1445                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1446                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1447                 </fields>
1448                 <links>
1449                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1450                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1451                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                 </links>
1454         </class>
1455
1456         <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">
1457                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1458                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1459                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1460                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1461                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1462                 </fields>
1463                 <links>
1464                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1465                 </links>
1466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1467                         <actions>
1468                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1469                     <context link="event_def" field="owner"/>
1470                 </create>
1471                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1472                     <context link="event_def" field="owner"/>
1473                 </retrieve>
1474                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1475                     <context link="event_def" field="owner"/>
1476                 </update>
1477                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1478                     <context link="event_def" field="owner"/>
1479                 </delete>
1480                         </actions>
1481                 </permacrud>
1482         </class>
1483
1484         <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">
1485                 <oils_persist:source_definition><![CDATA[
1486                 SELECT  atevdef.hook,
1487                         atevdef.name,
1488                         atevdef.reactor,
1489                         atev.id,
1490                         atev.event_def,
1491                         atev.add_time,
1492                         atev.run_time,
1493                         atev.start_time,
1494                         atev.update_time,
1495                         atev.complete_time,
1496                         atev.update_process,
1497                         atev.state,
1498                         atev.user_data,
1499                         atev.template_output,
1500                         atev.error_output,
1501                         atev.async_output,
1502                         targ_circ.id AS target_circ,
1503                         targ_ahr.id AS target_hold,
1504                         COALESCE(
1505                                 targ_circ.circ_lib,
1506                                 targ_ahr.pickup_lib
1507                         ) AS perm_lib
1508                 FROM action_trigger.event atev
1509                 JOIN action_trigger.event_definition atevdef ON
1510                         (atevdef.id = atev.event_def)
1511                 JOIN action_trigger.hook ath ON
1512                         (ath.key = atevdef.hook)
1513                 LEFT JOIN action.circulation targ_circ ON
1514                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1515                 LEFT JOIN action.hold_request targ_ahr ON
1516                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1517                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1518                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1519                                 'circ.staff.max_visible_event_age',
1520                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1521                         ) UNION
1522                         SELECT '1000 YEARS'::INTERVAL AS value
1523                 ) ous)
1524                 ]]></oils_persist:source_definition>
1525                 <fields oils_persist:primary="id">
1526                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1527                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1528                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1529                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1530                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1531                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1532                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1537                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1538                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1539                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1540                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1542                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1543                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1544                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1545                 </fields>
1546                 <links>
1547                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1548                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1549                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1552                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1553                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1554                 </links>
1555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1556                         <actions>
1557                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1558                         </actions>
1559                 </permacrud>
1560         </class>
1561
1562         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1563                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1564                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1565                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1566                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1567                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1568                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1569                 </fields>
1570                 <links>
1571                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1572                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1573                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1574                 </links>
1575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1576                         <actions>
1577                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1578                         </actions>
1579                 </permacrud>
1580         </class>
1581
1582         <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">
1583                 <fields oils_persist:primary="code">
1584                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1585                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1586                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1589                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1590                 </fields>
1591                 <links/>
1592         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1593             <actions>
1594                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1595                 <retrieve/>
1596                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1597                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1598             </actions>
1599         </permacrud>
1600         </class>
1601
1602         <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">
1603                 <fields oils_persist:primary="code">
1604                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1605                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1606                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1607                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1608                 </fields>
1609                 <links/>
1610         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1611             <actions>
1612                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1613                 <retrieve/>
1614                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1615                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1616             </actions>
1617         </permacrud>
1618         </class>
1619
1620         <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">
1621                 <fields oils_persist:primary="code">
1622                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1623                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1624                 </fields>
1625                 <links/>
1626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1627             <actions>
1628                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1629                 <retrieve/>
1630                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1631                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1632             </actions>
1633         </permacrud>
1634         </class>
1635
1636         <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">
1637                 <fields oils_persist:primary="code">
1638                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1639                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1640                 </fields>
1641                 <links/>
1642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1643             <actions>
1644                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1645                 <retrieve/>
1646                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1647                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1648             </actions>
1649         </permacrud>
1650         </class>
1651
1652         <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">
1653                 <fields oils_persist:primary="code">
1654                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1655                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1656                 </fields>
1657                 <links/>
1658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1659             <actions>
1660                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1661                 <retrieve/>
1662                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1663                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1664             </actions>
1665         </permacrud>
1666         </class>
1667
1668         <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">
1669                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1670                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1671                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1672                 </fields>
1673                 <links/>
1674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1675             <actions>
1676                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1677                 <retrieve/>
1678                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1679                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1680             </actions>
1681         </permacrud>
1682         </class>
1683
1684         <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">
1685                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1686                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1687                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1688                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1689                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1690                 </fields>
1691         <links>
1692             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1693             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1694             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1695         </links>
1696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1697             <actions>
1698                 <create permission="UPDATE_COPY">
1699                     <context link="target_copy" field="circ_lib"/>
1700                 </create>
1701                 <retrieve/>
1702                 <update permission="UPDATE_COPY">
1703                     <context link="target_copy" field="circ_lib"/>
1704                 </update>
1705                 <delete permission="UPDATE_COPY">
1706                     <context link="target_copy" field="circ_lib"/>
1707                 </delete>
1708             </actions>
1709         </permacrud>
1710         </class>
1711
1712         <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">
1713                 <fields oils_persist:primary="code">
1714                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1715                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1716                 </fields>
1717                 <links/>
1718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1719             <actions>
1720                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1721                 <retrieve/>
1722                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1723                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1724             </actions>
1725         </permacrud>
1726         </class>
1727
1728         <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">
1729                 <fields oils_persist:primary="code">
1730                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1731                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1732                 </fields>
1733                 <links/>
1734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1735             <actions>
1736                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1737                 <retrieve/>
1738                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1739                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1740             </actions>
1741         </permacrud>
1742         </class>
1743
1744         <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">
1745                 <fields oils_persist:primary="code">
1746                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1747                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1748                 </fields>
1749                 <links/>
1750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1751             <actions>
1752                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1753                 <retrieve/>
1754                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1755                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1756             </actions>
1757         </permacrud>
1758         </class>
1759
1760     <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">
1761         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1762             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1763             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1764             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1765             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1766             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1767             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1768             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1769             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1770             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1771             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1772             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1778             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1779         </fields>
1780         <links/>
1781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1782             <actions>
1783                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1784                 <retrieve/>
1785                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1786                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787             </actions>
1788         </permacrud>
1789     </class>
1790
1791     <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">
1792         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1793             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1794             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1795             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1796             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1797             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1798             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1799             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1800             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1801             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1802             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1803             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1804             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1805             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1806             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1807             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1808             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1809             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1811             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1812         </fields>
1813         <links/>
1814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1815             <actions>
1816                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1817                 <retrieve/>
1818                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1819                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820             </actions>
1821         </permacrud>
1822     </class>
1823
1824     <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">
1825         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1826             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1827             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1828             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1829             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1830             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1831         </fields>
1832         <links>
1833             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1834             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1835             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1836         </links>
1837         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1838             <actions>
1839                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1840                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843             </actions>
1844         </permacrud>
1845     </class>
1846
1847         <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">
1848                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1849                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1850                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1851                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1852                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1853                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1858                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1860                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1865             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1866                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1867                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1868                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1869                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1870                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1871                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1872                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1873                 </fields>
1874                 <links>
1875                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1876                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1881                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1883                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1884                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1885                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1886                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1887                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1888             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1889                 </links>
1890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1891             <actions>
1892                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1893                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896             </actions>
1897         </permacrud>
1898         </class>
1899
1900         <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">
1901                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1902                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1903                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1904                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1905                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1906                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1907                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1909                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1910                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1911                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1912                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1917             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1918                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1919                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1920             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1921                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1922                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1923                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1925             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1926             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1927             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1928                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1929                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1930                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1931                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1932                 </fields>
1933                 <links>
1934                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1935                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1939                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1940                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1941                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1942                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1943                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1944                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1945                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1946                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1947                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1948             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1949                 </links>
1950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1951             <actions>
1952                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1953                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956             </actions>
1957         </permacrud>
1958         </class>
1959
1960     <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">
1961         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1962             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1963             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1964             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1965         </fields>
1966         <links/>
1967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1968             <actions>
1969                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1970                 <retrieve/>
1971                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1972                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973             </actions>
1974         </permacrud>
1975     </class>
1976
1977     <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">
1978         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1979             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1980             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1981             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1982             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1983             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1984             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1985             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1986         </fields>
1987         <links>
1988             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1989         </links>
1990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1991             <actions>
1992                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1993                 <retrieve/>
1994                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1995                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996             </actions>
1997         </permacrud>
1998     </class>
1999
2000     <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">
2001         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2002             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2003             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2004             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2005             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2006             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2007         </fields>
2008         <links>
2009             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2010             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2011         </links>
2012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2013             <actions>
2014                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2015                     <context link="matchpoint" field="org_unit"/>
2016                 </create>
2017                 <retrieve/>
2018                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2019                     <context link="matchpoint" field="org_unit"/>
2020                 </update>
2021                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2022                     <context link="matchpoint" field="org_unit"/>
2023                 </delete>
2024             </actions>
2025         </permacrud>
2026     </class>
2027
2028     <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">
2029         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2030             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2031             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2032             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2033         </fields>
2034         <links>
2035             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2036             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2037         </links>
2038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2039             <actions>
2040                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2041                     <context link="limit_set" field="owning_lib"/>
2042                 </create>
2043                 <retrieve/>
2044                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2045                     <context link="limit_set" field="owning_lib"/>
2046                 </update>
2047                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2048                     <context link="limit_set" field="owning_lib"/>
2049                 </delete>
2050             </actions>
2051         </permacrud>
2052     </class>
2053     <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">
2054         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2055             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2056             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2057             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2058         </fields>
2059         <links>
2060             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2061             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2062         </links>
2063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2064             <actions>
2065                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2066                     <context link="limit_set" field="owning_lib"/>
2067                 </create>
2068                 <retrieve/>
2069                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2070                     <context link="limit_set" field="owning_lib"/>
2071                 </update>
2072                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2073                     <context link="limit_set" field="owning_lib"/>
2074                 </delete>
2075             </actions>
2076         </permacrud>
2077     </class>
2078
2079     <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">
2080         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2081             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2082             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2083             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2084             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2085         </fields>
2086         <links>
2087             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2088             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2089         </links>
2090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2091             <actions>
2092                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2093                     <context link="limit_set" field="owning_lib"/>
2094                 </create>
2095                 <retrieve/>
2096                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2097                     <context link="limit_set" field="owning_lib"/>
2098                 </update>
2099                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2100                     <context link="limit_set" field="owning_lib"/>
2101                 </delete>
2102             </actions>
2103         </permacrud>
2104     </class>
2105
2106         <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">
2107                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2108                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2109                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2110                 </fields>
2111                 <links/>
2112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2113             <actions>
2114                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2115                 <retrieve/>
2116                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2117                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118             </actions>
2119         </permacrud>
2120         </class>
2121
2122         <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">
2123                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2124                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2125                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2127                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2128                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2129                 </fields>
2130                 <links>
2131                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2132                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2133                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2134                 </links>
2135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2136             <actions>
2137                 <create permission="ADMIN_SURVEY">
2138                     <context link="survey" field="owner"/>
2139                 </create>
2140                 <retrieve/>
2141                 <update permission="ADMIN_SURVEY">
2142                     <context link="survey" field="owner"/>
2143                 </update>
2144                 <delete permission="ADMIN_SURVEY">
2145                     <context link="survey" field="owner"/>
2146                 </delete>
2147             </actions>
2148         </permacrud>
2149         </class>
2150         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2151                 <fields oils_persist:primary="id" oils_persist:sequence="">
2152                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2153                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2154                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2155                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2156                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2157                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2159                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2160                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2161                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2162                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2163                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2164                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2166                 </fields>
2167                 <links>
2168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2169                 </links>
2170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2171                         <actions>
2172                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2173                                         <context link="usr" field="home_ou" />
2174                                 </retrieve>
2175                         </actions>
2176                 </permacrud>
2177         </class>
2178         <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">
2179                 <fields oils_persist:primary="id" oils_persist:sequence="">
2180                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2181                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2182                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2183                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2184                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2185                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2187                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2188                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2189                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2190                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2191                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2192                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2194                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2195                 </fields>
2196                 <links>
2197                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2198                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2199                 </links>
2200         </class>
2201         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2202                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2203                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2206                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2207                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2208                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2209                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2210                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2211                 </fields>
2212                 <links>
2213                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2214                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2215                 </links>
2216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2217                         <actions> <!-- created magically, so no create action -->
2218                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2219                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2220                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2221                         </actions>
2222                 </permacrud>
2223         </class>
2224         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2225                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2226                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2227                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2229                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2230                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2231                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2232                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2233                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2234                 </fields>
2235                 <links>
2236                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2237                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2238                 </links>
2239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2240                         <actions> <!-- created magically, so no create action -->
2241                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2242                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                         </actions>
2244                 </permacrud>
2245         </class>
2246         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2248                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2249                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2250                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2251                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2252                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2253                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2254                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2255                 </fields>
2256                 <links>
2257                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2258                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2259                 </links>
2260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2261             <actions>
2262                 <create permission="UPDATE_USER" context_field="owner">
2263                     <context link="usr" field="home_ou"/>
2264                 </create>
2265                                 <!-- note: public notes are still accessible via API -->
2266                 <retrieve permission="UPDATE_USER">
2267                     <context link="usr" field="home_ou"/>
2268                                 </retrieve>
2269                 <update permission="UPDATE_USER">
2270                     <context link="usr" field="home_ou"/>
2271                                 </update>
2272                 <delete permission="UPDATE_USER">
2273                     <context link="usr" field="home_ou"/>
2274                                 </delete>
2275             </actions>
2276         </permacrud>
2277         </class>
2278         <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">
2279                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2280                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2281                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2282                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2283                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2284                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2285                 </fields>
2286                 <links>
2287                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2288                 </links>
2289         </class>
2290         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2291                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2292                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2293                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2294                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2295                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2296                 </fields>
2297                 <links>
2298                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2299                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2300                 </links>
2301         </class>
2302         <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">
2303                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2304                         <field name="field" reporter:datatype="link"/>
2305                         <field name="id" reporter:datatype="id" />
2306                         <field name="source" reporter:datatype="link"/>
2307                         <field name="value" reporter:datatype="text"/>
2308                 </fields>
2309                 <links>
2310                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2311                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2312                 </links>
2313         </class>
2314         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2315                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2316                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2317                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2318                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2319                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2320                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2321                 </fields>
2322                 <links>
2323                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2324                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2325                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2326                 </links>
2327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2328                         <actions>
2329                                 <retrieve/>
2330                         </actions>
2331                 </permacrud>
2332         </class>
2333         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" 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">
2334                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2335                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2336                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2337                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2338                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2339                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2340                 </fields>
2341                 <links>
2342                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2343                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2344                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2345                 </links>
2346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2347                         <actions>
2348                                 <retrieve/>
2349                         </actions>
2350                 </permacrud>
2351         </class>
2352         <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">
2353                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2354                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2355                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2356                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2357                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2358                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2359                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2360                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2361                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2362                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2363                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2364                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2365                 </fields>
2366                 <links>
2367                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2368                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2369                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2370                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2371                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2373                 </links>
2374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2375             <actions>
2376                 <create permission="TRANSIT_COPY" context_field="owner">
2377                     <context link="target_copy" field="circ_lib"/>
2378                 </create>
2379                 <retrieve/>
2380                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2381                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2382             </actions>
2383         </permacrud>
2384         </class>
2385         <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">
2386                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2387                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2388                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2389                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2390                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2391                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2392                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2393                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2394                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2395                 </fields>
2396                 <links>
2397                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2398                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2399                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2400                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2401                 </links>
2402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2403             <actions>
2404                 <create permission="ADMIN_SURVEY">
2405                     <context link="survey" field="owner"/>
2406                 </create>
2407                 <retrieve permission="VIEW_USER">
2408                     <context link="usr" field="home_ou"/>
2409                 </retrieve>
2410                 <update permission="ADMIN_SURVEY">
2411                     <context link="survey" field="owner"/>
2412                 </update>
2413                 <delete permission="ADMIN_SURVEY">
2414                     <context link="survey" field="owner"/>
2415                 </delete>
2416             </actions>
2417         </permacrud>
2418         </class>
2419         <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">
2420                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2421                         <field name="bucket" />
2422                         <field name="id" reporter:datatype="id" />
2423                         <field name="target_copy" reporter:datatype="link"/>
2424                         <field name="create_time" reporter:datatype="timestamp" />
2425                         <field name="pos" reporter:datatype="int" />
2426                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2427                 </fields>
2428                 <links>
2429                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2430                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2431             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2432                 </links>
2433         </class>
2434         <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">
2435                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2436                         <field name="id" reporter:datatype="id" />
2437                         <field name="item" reporter:datatype="link"/>
2438                         <field name="note" reporter:datatype="text" />
2439                 </fields>
2440                 <links>
2441                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2442                 </links>
2443         </class>
2444
2445         <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">
2446                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2447                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2448                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2449                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2450                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2451                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2452                 </fields>
2453                 <links>
2454                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2455                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2456                 </links>
2457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2458                         <actions>
2459                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2460                                 <retrieve/>
2461                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2462                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2463                         </actions>
2464                 </permacrud>
2465         </class>
2466
2467         <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">
2468                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2469                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2470                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2471                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2472                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2473                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2474                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2475                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2476                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2477                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2478                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2479                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2480                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2481                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2482                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2483                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2484                 </fields>
2485                 <links>
2486                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2487                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2488                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2489                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2490                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2491                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2492                 </links>
2493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2494                         <actions>
2495                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2496                                 <retrieve/>
2497                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2498                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2499                         </actions>
2500                 </permacrud>
2501         </class>
2502
2503         <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">
2504                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2505                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2506                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2507                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2508                 </fields>
2509                 <links>
2510                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2511                 </links>
2512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2513                         <actions>
2514                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2515                                 <retrieve/>
2516                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2517                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2518                         </actions>
2519                 </permacrud>
2520         </class>
2521
2522         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2523                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2524                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2525                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2526                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2527                 </fields>
2528                 <links>
2529                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2530                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2531                 </links>
2532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2533                         <actions>
2534                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2535                                 <retrieve/>
2536                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2537                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2538                         </actions>
2539                 </permacrud>
2540         </class>
2541
2542         <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">
2543                 <fields oils_persist:primary="code">
2544                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2545                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2546                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2547                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2548                 </fields>
2549                 <links>
2550                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2551                 </links>
2552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2553                         <actions>
2554                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2555                                 <retrieve/>
2556                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2557                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2558                         </actions>
2559                 </permacrud>
2560         </class>
2561
2562         <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">
2563                 <fields oils_persist:primary="code">
2564                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2565                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2566                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2567                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2568                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2569                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2570                 </fields>
2571                 <links>
2572                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2573                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2574                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2575                 </links>
2576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2577                         <actions>
2578                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2579                                 <retrieve/>
2580                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2581                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2582                         </actions>
2583                 </permacrud>
2584         </class>
2585
2586     <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">
2587         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2588             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2589             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2590             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2591         </fields>
2592         <links>
2593             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2594             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2595         </links>
2596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2597             <actions>
2598                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2599                 <retrieve/>
2600                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2601                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2602             </actions>
2603         </permacrud>
2604     </class>
2605
2606         <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">
2607                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2608                         <field name="active" reporter:datatype="bool"/>
2609                         <field name="create_date" reporter:datatype="timestamp"/>
2610                         <field name="creator" />
2611                         <field name="deleted" reporter:datatype="bool"/>
2612                         <field name="edit_date" reporter:datatype="timestamp"/>
2613                         <field name="editor" />
2614                         <field name="id" reporter:datatype="id" />
2615                         <field name="last_xact_id" />
2616                         <field name="marc" />
2617                         <field name="source" />
2618                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2619                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2620                         <field name="heading" />
2621                         <field name="simple_heading" />
2622                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2623                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2624                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2625                 </fields>
2626                 <links>
2627                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2629                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2630                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2631                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2632                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2633                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2634                 </links>
2635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2636                         <actions>
2637                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2638                                 <retrieve/>
2639                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2640                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2641                         </actions>
2642                 </permacrud>
2643         </class>
2644         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2645                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2646                         <field name="char_encoding" />
2647                         <field name="id" />
2648                         <field name="record" />
2649                         <field name="record_status" />
2650                         <field name="thesaurus" />
2651                 </fields>
2652                 <links>
2653                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2654                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2655                 </links>
2656         </class>
2657         <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">
2658                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2659                         <field name="id" reporter:datatype="id" />
2660                         <field name="bib" reporter:datatype="link" />
2661                         <field name="authority" reporter:datatype="link" />
2662                 </fields>
2663                 <links>
2664                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2665                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2666                 </links>
2667         </class>
2668         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2669                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2670                         <field name="id" reporter:datatype="id" />
2671                         <field name="record" reporter:datatype="link" />
2672                         <field name="atag" reporter:datatype="link" />
2673                         <field name="value" reporter:datatype="text" />
2674                 </fields>
2675                 <links>
2676                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2677                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2678                 </links>
2679         </class>
2680         <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">
2681                 <fields oils_persist:primary="code" oils_persist:sequence="">
2682                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2683                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2684                 </fields>
2685                 <links/>
2686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2687             <actions>
2688                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2689                 <retrieve/>
2690                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2691                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2692             </actions>
2693         </permacrud>
2694         </class>
2695         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2696                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2697                         <field name="accepting_usr" />
2698                         <field name="amount" reporter:datatype="money" />
2699                         <field name="amount_collected" reporter:datatype="money" />
2700                         <field name="approval_code" reporter:datatype="text"/>
2701                         <field name="cash_drawer" reporter:datatype="link"/>
2702                         <field name="cc_number" reporter:datatype="text"/>
2703                         <field name="cc_order_number" reporter:datatype="text"/>
2704                         <field name="cc_processor" reporter:datatype="text"/>
2705                         <field name="id" reporter:datatype="id" />
2706                         <field name="note" reporter:datatype="text"/>
2707                         <field name="payment_ts" reporter:datatype="timestamp"/>
2708                         <field name="xact" reporter:datatype="link"/>
2709                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2710                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2711                 </fields>
2712                 <links>
2713                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2714                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2715                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2716                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2717                 </links>
2718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2719             <actions>
2720                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2721                     <context link="xact" jump="usr" field="home_ou"/>
2722                 </retrieve>
2723                         </actions>
2724                 </permacrud>
2725         </class>
2726         <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">
2727                 <fields oils_persist:primary="name">
2728                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2729                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2730                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2731                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2732                 </fields>
2733                 <links/>
2734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2735             <actions>
2736                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2737                 <retrieve/>
2738                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2739                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2740             </actions>
2741         </permacrud>
2742         </class>
2743
2744         <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">
2745                 <fields oils_persist:primary="alias">
2746                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2747                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2748                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2749                 </fields>
2750                 <links>
2751                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2752                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2753                 </links>
2754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2755             <actions>
2756                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2757                 <retrieve/>
2758                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2759                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2760             </actions>
2761         </permacrud>
2762         </class>
2763
2764         <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">
2765                 <fields oils_persist:primary="name">
2766                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2767                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2768                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2769                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2770                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2771                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2772                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2773                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2774                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2775                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2776                 </fields>
2777                 <links>
2778                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2779                 </links>
2780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2781             <actions>
2782                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2783                 <retrieve/>
2784                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2785                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2786             </actions>
2787         </permacrud>
2788         </class>
2789
2790         <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">
2791                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2792                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2793                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2794                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2795                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2796                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2797                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2798                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2799                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2800                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2801                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2802                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2803                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2804                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2805                 </fields>
2806                 <links>
2807                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2808                 </links>
2809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2810             <actions>
2811                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2812                 <retrieve/>
2813                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2814                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2815             </actions>
2816         </permacrud>
2817         </class>
2818         <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">
2819                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2820                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2821                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2822                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2823                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2824                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2825                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2826                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2827                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2828                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2829                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2830                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2831                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2832                 </fields>
2833                 <links>
2834                 </links>
2835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2836                         <actions>
2837                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2838                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2839                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2840                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2841                         </actions>
2842                 </permacrud>
2843         </class>
2844         <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">
2845                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2846                         <field name="id" reporter:datatype="id" />
2847                         <field name="name" reporter:datatype="text"/>
2848                         <field name="xpath" reporter:datatype="text"/>
2849                         <field name="format" reporter:datatype="link"/>
2850                         <field name="first_word" reporter:datatype="bool" />
2851                 </fields>
2852                 <links/>
2853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2854             <actions>
2855                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2856                 <retrieve/>
2857                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2858                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2859             </actions>
2860         </permacrud>
2861         </class>
2862         <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">
2863                 <fields oils_persist:primary="code" oils_persist:sequence="">
2864                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2865                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2866                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2867                 </fields>
2868                 <links/>
2869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2870             <actions>
2871                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2872                 <retrieve/>
2873                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2874                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2875             </actions>
2876         </permacrud>
2877         </class>
2878         <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">
2879                 <fields oils_persist:primary="code" oils_persist:sequence="">
2880                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2881                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2882                 </fields>
2883                 <links/>
2884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2885             <actions>
2886                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2887                 <retrieve/>
2888                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2889                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2890             </actions>
2891         </permacrud>
2892         </class>
2893     <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">
2894         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2895             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2896             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2897             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2898             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2899         </fields>
2900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2901             <actions>
2902                 <retrieve/>
2903             </actions>
2904         </permacrud>
2905     </class>
2906         <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">
2907                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2908                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2909                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2910                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2911                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2912                 </fields>
2913                 <links>
2914                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2915                 </links>
2916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2917             <actions>
2918                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2919                 <retrieve/>
2920                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2921                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2922             </actions>
2923         </permacrud>
2924         </class>
2925         <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">
2926                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2927                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2928                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2929                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2930                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2931                 </fields>
2932                 <links>
2933                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2934                 </links>
2935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2936             <actions>
2937                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2938                 <retrieve/>
2939                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2940                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2941             </actions>
2942         </permacrud>
2943         </class>
2944         <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">
2945                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2946                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2947                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2948                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2949                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2950                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2951                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2952                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2953                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2954                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2955                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2956                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2957                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2960                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2961                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2962                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2963                 </fields>
2964                 <links>
2965                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2966                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2967                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2968                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2969                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2970                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2971                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2972                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2973                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2974                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2975                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2976                 </links>
2977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2978             <actions>
2979                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2980                 <retrieve/>
2981                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2982                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2983             </actions>
2984         </permacrud>
2985         </class>
2986         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2987                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2988                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2989                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2990                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2991                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2992                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2993                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2994                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2995                 </fields>
2996                 <links>
2997                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2998                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2999         </links>
3000         </class>
3001         <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">
3002                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3003                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3004                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3005                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3006                 </fields>
3007                 <links>
3008                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3009                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3010                 </links>
3011         </class>
3012         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3013                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3014                         <field name="id" reporter:datatype="id" />
3015                         <field name="value" oils_persist:i18n="true" />
3016                 </fields>
3017                 <links/>
3018         </class>
3019         <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">
3020                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3021                         <field name="balance_owed" reporter:datatype="money" />
3022                         <field name="total_owed" reporter:datatype="money" />
3023                         <field name="total_paid" reporter:datatype="money" />
3024                         <field name="usr" reporter:datatype="link"/>
3025                 </fields>
3026                 <links>
3027                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3028         </links>
3029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3030             <actions>
3031                 <retrieve permission="VIEW_USER">
3032                     <context link="usr" field="home_ou"/>
3033                 </retrieve>
3034             </actions>
3035         </permacrud>
3036         </class>
3037         <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">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3039                         <field name="collector" />
3040                         <field name="enter_time" reporter:datatype="timestamp"/>
3041                         <field name="id" reporter:datatype="id" />
3042                         <field name="location" reporter:datatype="link"/>
3043                         <field name="usr" reporter:datatype="link"/>
3044                 </fields>
3045                 <links>
3046                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3047                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3048                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3049                 </links>
3050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3051             <actions>
3052                 <create permission="money.collections_tracker.create" context_field="location"/>
3053                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3054                 <delete permission="money.collections_tracker.create" context_field="location"/>
3055             </actions>
3056         </permacrud>
3057         </class>
3058         <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">
3059                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3060                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3061                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3062                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3063                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3064                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3065                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3066                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3067                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3068                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3069                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3070                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3071                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3072                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3073                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3074                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3075                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3076                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3077                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3078                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3086                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3093                 </fields>
3094                 <links>
3095                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3096                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3097                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3098                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3099                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3100                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3101                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3102                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3103                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3104                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3105                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3106                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3107                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3108                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3109                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3110                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3111                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3112                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3113                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3114                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3115                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3116                 </links>
3117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3118             <actions>
3119                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3120                 <retrieve/>
3121                 <update permission="UPDATE_MARC" global_required="true"/>
3122                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3123                 <delete permission="DELETE_RECORD" global_required="true"/>
3124             </actions>
3125         </permacrud>
3126         </class>
3127         <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">
3128                 <fields oils_persist:primary="id">
3129                         <field name="dow_0_close" />
3130                         <field name="dow_0_open" />
3131                         <field name="dow_1_close" />
3132                         <field name="dow_1_open" />
3133                         <field name="dow_2_close" />
3134                         <field name="dow_2_open" />
3135                         <field name="dow_3_close" />
3136                         <field name="dow_3_open" />
3137                         <field name="dow_4_close" />
3138                         <field name="dow_4_open" />
3139                         <field name="dow_5_close" />
3140                         <field name="dow_5_open" />
3141                         <field name="dow_6_close" />
3142                         <field name="dow_6_open" />
3143                         <field name="id" reporter:datatype="id" />
3144                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3145                 </fields>
3146                 <links>
3147                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3148                 </links>
3149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3150             <actions>
3151                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3152                 <retrieve/>
3153                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3154                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3155             </actions>
3156         </permacrud>
3157         </class>
3158         <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">
3159                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3160                         <field name="id" reporter:datatype="id" />
3161                         <field name="record" reporter:datatype="link"/>
3162                         <field name="label" reporter:datatype="text"/>
3163                         <field name="label_sortkey" reporter:datatype="text"/>
3164                         <field name="deleted" reporter:datatype="bool"/>
3165                 </fields>
3166                 <links>
3167                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3168                 </links>
3169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3170             <actions>
3171                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3172                 <retrieve/>
3173                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3174                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3175             </actions>
3176         </permacrud>
3177         </class>
3178         <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">
3179                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3180                         <field name="id" reporter:datatype="id" />
3181                         <field name="target_copy" reporter:datatype="link" />
3182                         <field name="part" reporter:datatype="link"/>
3183                 </fields>
3184                 <links>
3185                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3186                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3187                 </links>
3188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3189             <actions>
3190                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3191                 <retrieve/>
3192                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3193                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3194             </actions>
3195         </permacrud>
3196         </class>
3197         <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">
3198                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3199                         <field name="close_end" reporter:datatype="timestamp" />
3200                         <field name="close_start" reporter:datatype="timestamp" />
3201                         <field name="id" reporter:datatype="id" />
3202                         <field name="org_unit" reporter:datatype="org_unit"/>
3203                         <field name="reason" reporter:datatype="text"/>
3204                 </fields>
3205                 <links>
3206                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3207                 </links>
3208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3209             <actions>
3210                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3211                 <retrieve/>
3212                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3213                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3214             </actions>
3215         </permacrud>
3216         </class>
3217         <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">
3218                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3219                         <field name="extended" reporter:datatype="interval"/>
3220                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3221                         <field name="max_renewals" reporter:datatype="int" />
3222                         <field name="name" reporter:datatype="text"/>
3223                         <field name="normal" reporter:datatype="interval"/>
3224                         <field name="shrt" reporter:datatype="interval"/>
3225                 </fields>
3226                 <links>
3227                 </links>
3228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3229             <actions>
3230                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3231                 <retrieve/>
3232                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3233                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3234             </actions>
3235         </permacrud>
3236         </class>
3237
3238         <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">
3239                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3240                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3241                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3242             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3243                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3244             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3245                 </fields>
3246                 <links>
3247             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3248                 </links>
3249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250             <actions>
3251                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3252                 <retrieve/>
3253                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3254                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3255             </actions>
3256                 </permacrud>
3257         </class>
3258
3259         <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">
3260                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3261                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3262                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3263                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3264             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3265                 </fields>
3266                 <links>
3267                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3268                 </links>
3269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3270             <actions>
3271                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3272                 <retrieve/>
3273                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3274                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3275             </actions>
3276                 </permacrud>
3277         </class>
3278
3279         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3280                 <fields oils_persist:primary="id" oils_persist:sequence="">
3281                         <field name="balance_owed" reporter:datatype="money"/>
3282                         <field name="id" reporter:datatype="id" />
3283                         <field name="last_billing_note" reporter:datatype="text"/>
3284                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3285                         <field name="last_billing_type" reporter:datatype="text"/>
3286                         <field name="last_payment_note" reporter:datatype="text"/>
3287                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3288                         <field name="last_payment_type" reporter:datatype="text"/>
3289                         <field name="total_owed" reporter:datatype="money"/>
3290                         <field name="total_paid" reporter:datatype="money"/>
3291                         <field name="usr" reporter:datatype="link"/>
3292                         <field name="xact_finish" reporter:datatype="timestamp" />
3293                         <field name="xact_start" reporter:datatype="timestamp" />
3294                         <field name="xact_type" reporter:datatype="text"/>
3295                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3296                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3297                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3298                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3299                         <field name="billing_location" reporter:datatype="link"/>
3300                 </fields>
3301                 <links>
3302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3303                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3304                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3305                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3306                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3307                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3308                 </links>
3309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3310                         <actions>
3311                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3312                                         <context link="usr" field="home_ou" />
3313                                 </retrieve>
3314                         </actions>
3315                 </permacrud>
3316         </class>
3317         <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">
3318                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3319                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3320                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3321                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3323                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3325                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3326                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3327                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3328                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3329                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3330                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3331                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3332                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3333                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3334                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3335                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3336                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3337                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3338                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3339                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3340                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3341                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3342                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3343                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3344                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3345                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3346                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3347                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3348                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3349                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3350                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3351                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3352                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3353                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3354                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3355                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3356                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3357                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3358                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3359                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3360                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3361                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3362                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3363                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3364                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3365                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3366                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3367                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3368                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3369                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3370                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3371                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3372                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3373                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3374                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3375                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3376                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3377                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3378                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3379                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3383                 </fields>
3384                 <links>
3385                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3386                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3387                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3388                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3389                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3390                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3391                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3392                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3393                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3394                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3395                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3396                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3397                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3398                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3399                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3400                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3401                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3402                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3403                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3404                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3405                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3406                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3407                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3408                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3409                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3410                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3411                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3412                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3413                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3414                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3415                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3416                 </links>
3417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3418                         <actions>
3419                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3420                         </actions>
3421                 </permacrud>
3422         </class>
3423         <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">
3424                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3425                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3426                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3427                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3428                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3429                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3430                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3431                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3432                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3433         </fields>
3434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3435                         <actions>
3436                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3437                                 <retrieve/>
3438                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3439                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3440                         </actions>
3441                 </permacrud>
3442         </class>
3443         <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">
3444                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3445                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3446                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3447                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3448                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3449         </fields>
3450         <links>
3451                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3452                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3453                 </links>
3454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3455                         <actions>
3456                                 <retrieve permission="RUN_REPORTS">
3457                                         <context link="usr" field="home_ou" />
3458                                 </retrieve>
3459                         </actions>
3460                 </permacrud>
3461         </class>
3462         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3463                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3464                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3465                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3466                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3467                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3468                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3469                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3470         </fields>
3471         <links>
3472                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3473                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3474                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3475                 </links>
3476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3477                         <actions>
3478                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3479                                         <context link="usr" field="home_ou" />
3480                                         <context link="ws" field="owning_lib" />
3481                                 </retrieve>
3482                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3483                                         <context link="usr" field="home_ou" />
3484                                         <context link="ws" field="owning_lib" />
3485                                 </create>
3486                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3487                                         <context link="usr" field="home_ou" />
3488                                         <context link="ws" field="owning_lib" />
3489                                 </update>
3490                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3491                                         <context link="usr" field="home_ou" />
3492                                         <context link="ws" field="owning_lib" />
3493                                 </delete>
3494                         </actions>
3495                 </permacrud>
3496         </class>
3497         <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">
3498                 <fields oils_persist:primary="name">
3499                         <field name="name" reporter:datatype="text"/>
3500                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3501                 </fields>
3502                 <links/>
3503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3504                         <actions>
3505                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3506                                 <retrieve/>
3507                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3508                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3509                         </actions>
3510                 </permacrud>
3511         </class>
3512         <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">
3513                 <fields oils_persist:primary="name">
3514                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3515                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3516                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3517                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3518                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3519                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3520                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3521                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3522                 </fields>
3523                 <links>
3524                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3525                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3526                 </links>
3527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3528                         <actions>
3529                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3530                                 <retrieve/>
3531                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3532                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3533                         </actions>
3534                 </permacrud>
3535         </class>
3536         <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">
3537                 <fields oils_persist:primary="name">
3538                         <field name="name" reporter:datatype="text"/>
3539                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3540                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3541                         <field name="datatype" reporter:datatype="text"/>
3542                         <field name="view_perm" reporter:datatype="link"/>
3543                         <field name="update_perm" reporter:datatype="link"/>
3544                         <field name="fm_class" reporter:datatype="text"/>
3545                         <field name="grp" reporter:datatype="link"/>
3546                 </fields>
3547                 <links>
3548                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3549                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3550                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3551                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3552                 </links>
3553                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3554                         <actions>
3555                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3556                                 <retrieve/>
3557                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3558                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3559                         </actions>
3560                 </permacrud>
3561         </class>
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3564                         <field name="id" />
3565                         <field name="name"  reporter:datatype="text"/>
3566                         <field name="org_unit" reporter:datatype="org_unit"/>
3567                         <field name="value"  reporter:datatype="text"/>
3568                 </fields>
3569                 <links>
3570                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3571                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3572                 </links>
3573         </class>
3574         <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">
3575                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3576                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3577                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3578                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3579                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3580                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3581                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3582                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3583                 </fields>
3584                 <links>
3585                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3586                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3587                 </links>
3588         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3589             <actions>
3590                 <create permission="CREATE_COPY_NOTE">
3591                     <context link="owning_copy" field="circ_lib"/>
3592                 </create>
3593                 <retrieve permission="VIEW_COPY_NOTES">
3594                     <context link="owning_copy" field="circ_lib"/>
3595                 </retrieve>
3596                 <update permission="UPDATE_COPY_NOTE">
3597                     <context link="owning_copy" field="circ_lib"/>
3598                 </update>
3599                 <delete permission="DELETE_COPY_NOTE">
3600                     <context link="owning_copy" field="circ_lib"/>
3601                 </delete>
3602             </actions>
3603         </permacrud>
3604         </class>
3605         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3606                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3607                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3608                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3609                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3610                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3611                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3612                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3613                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3614                 </fields>
3615                 <links>
3616                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3617                 </links>
3618         </class>
3619         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3620                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3621                         <field name="fingerprint"  reporter:datatype="text"/>
3622                         <field name="id" reporter:datatype="id" />
3623                         <field name="master_record" reporter:datatype="link"/>
3624                         <field name="mods"  reporter:datatype="text"/>
3625                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3626                 </fields>
3627                 <links>
3628                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3629                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3630                 </links>
3631         </class>
3632         <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">
3633                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3634                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3635                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3636                 </fields>
3637                 <links/>
3638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3639             <actions>
3640                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3641                 <retrieve/>
3642                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3643                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3644             </actions>
3645         </permacrud>
3646         </class>
3647         <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">
3648                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3649                         <field name="code"  reporter:datatype="text"/>
3650                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3651                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3652                 </fields>
3653                 <links/>
3654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3655             <actions>
3656                 <create permission="CREATE_PERM" global_required="true"/>
3657                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3658                 <update permission="UPDATE_PERM" global_required="true"/>
3659                 <delete permission="DELETE_PERM" global_required="true"/>
3660             </actions>
3661         </permacrud>
3662         </class>
3663         <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">
3664                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3665                         <field name="id" reporter:datatype="id" />
3666                         <field name="metarecord" reporter:datatype="link"/>
3667                         <field name="source" reporter:datatype="link"/>
3668                 </fields>
3669                 <links>
3670                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3671                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3672                 </links>
3673         </class>
3674         <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">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3676                         <field name="id" reporter:datatype="id" />
3677                         <field name="field" reporter:datatype="link"/>
3678                         <field name="source" reporter:datatype="link"/>
3679                         <field name="value"  reporter:datatype="text"/>
3680                 </fields>
3681                 <links>
3682                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3684                 </links>
3685         </class>
3686         <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">
3687                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3688                         <field name="id" reporter:datatype="id" />
3689                         <field name="value" reporter:datatype="text"/>
3690                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3691                 </fields>
3692                 <links>
3693                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3694                 </links>
3695         </class>
3696         <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">
3697                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3698                         <field name="id" reporter:datatype="id" />
3699                         <field name="entry" reporter:datatype="link"/>
3700                         <field name="def" reporter:datatype="link"/>
3701                         <field name="source" reporter:datatype="link"/>
3702                 </fields>
3703                 <links>
3704                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3705                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3706                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3707                 </links>
3708         </class>
3709         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
3710                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3711                         <field name="id" reporter:datatype="id" />
3712                         <field name="entry" reporter:datatype="link"/>
3713                         <field name="simple_heading" reporter:datatype="link"/>
3714                 </fields>
3715                 <links>
3716                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3717                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3718                 </links>
3719         </class>
3720         <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">
3721                 <oils_persist:source_definition>
3722                         SELECT * FROM metabib.author_field_entry
3723                                                 UNION ALL
3724                         SELECT * FROM metabib.keyword_field_entry
3725                                                 UNION ALL
3726                         SELECT * FROM metabib.identifier_field_entry
3727                                                 UNION ALL
3728                         SELECT * FROM metabib.title_field_entry
3729                                                 UNION ALL
3730                         SELECT * FROM metabib.subject_field_entry
3731                                                 UNION ALL
3732                         SELECT * FROM metabib.series_field_entry
3733                 </oils_persist:source_definition>
3734                 <fields>
3735                         <field name="field" reporter:datatype="link"/>
3736                         <field name="id" reporter:datatype="id" />
3737                         <field name="source" reporter:datatype="link"/>
3738                         <field name="value"  reporter:datatype="text"/>
3739                 </fields>
3740                 <links>
3741                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3742                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3743                 </links>
3744         </class>
3745         <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">
3746                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3747                         <field name="field" reporter:datatype="link"/>
3748                         <field name="id" reporter:datatype="id" />
3749                         <field name="source" reporter:datatype="link"/>
3750                         <field name="value"  reporter:datatype="text"/>
3751                 </fields>
3752                 <links>
3753                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3754                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3755                 </links>
3756         </class>
3757         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3758                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3759                         <field name="accepting_usr" reporter:datatype="link"/>
3760                         <field name="amount" reporter:datatype="money" />
3761                         <field name="amount_collected" reporter:datatype="money" />
3762                         <field name="cash_drawer" reporter:datatype="link"/>
3763                         <field name="id" reporter:datatype="id" />
3764                         <field name="note"  reporter:datatype="text"/>
3765                         <field name="payment_ts" reporter:datatype="timestamp"/>
3766                         <field name="xact" reporter:datatype="link"/>
3767                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3768                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3769                 </fields>
3770                 <links>
3771                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3772                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3773                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3774                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3775                 </links>
3776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3777             <actions>
3778                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3779                     <context link="xact" jump="usr" field="home_ou"/>
3780                 </retrieve>
3781                         </actions>
3782                 </permacrud>
3783         </class>
3784         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3785                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3786                         <field name="accepting_usr" reporter:datatype="link"/>
3787                         <field name="amount" reporter:datatype="money" />
3788                         <field name="amount_collected" reporter:datatype="money" />
3789                         <field name="id" reporter:datatype="id" />
3790                         <field name="note"  reporter:datatype="text"/>
3791                         <field name="payment_ts" reporter:datatype="timestamp"/>
3792                         <field name="xact" reporter:datatype="link"/>
3793                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3794                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3795                 </fields>
3796                 <links>
3797                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3798                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3799                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3800                 </links>
3801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3802             <actions>
3803                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3804                     <context link="xact" jump="usr" field="home_ou"/>
3805                 </retrieve>
3806                         </actions>
3807                 </permacrud>
3808         </class>
3809         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3810                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3811                         <field name="accepting_usr" reporter:datatype="link"/>
3812                         <field name="amount" reporter:datatype="money" />
3813                         <field name="amount_collected" reporter:datatype="money" />
3814                         <field name="id" reporter:datatype="id" />
3815                         <field name="note"  reporter:datatype="text"/>
3816                         <field name="payment_ts" reporter:datatype="timestamp"/>
3817                         <field name="xact" reporter:datatype="link"/>
3818                         <field name="billing" reporter:datatype="link"/>
3819                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3820                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3821                 </fields>
3822                 <links>
3823                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3824                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3825                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3826                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3827                 </links>
3828         </class>
3829         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3830                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3831                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3832                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3833                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3834                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3835                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3836                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3837                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3838                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3839                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3840                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3841                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3842                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3843                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3844                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3845                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3846                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3847                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3848                 </fields>
3849                 <links>
3850                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3851                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3852                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3853                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3854                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3855                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3856                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3857                 </links>
3858         </class>
3859
3860         <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">
3861                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3862                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3863                         <field name="name"  reporter:datatype="text"/>
3864                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3865                         <field name="block_list" reporter:datatype="text"/>
3866                         <field name="staff_alert" reporter:datatype="bool"/>
3867                         <field name="org_depth" reporter:datatype="int"/>
3868                         <field name="ignore_proximity" reporter:datatype="int"/>
3869                 </fields>
3870                 <links/>
3871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3872             <actions>
3873                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3874                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3875                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3876                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3877             </actions>
3878         </permacrud>
3879         </class>
3880         <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">
3881                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3882                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3883                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3884                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3885                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3886                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3887                 </fields>
3888                 <links>
3889                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3890                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3891                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3892         </links>
3893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3894             <actions>
3895                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3896                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3897                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3898                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3899             </actions>
3900         </permacrud>
3901         </class>
3902         <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">
3903                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3904                         <field name="holdable" reporter:datatype="bool"/>
3905                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3906                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3907                         <field name="opac_visible" reporter:datatype="bool"/>
3908             <field name="copy_active" reporter:datatype="bool"/>
3909             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3910             <field name="is_available" reporter:datatype="bool"/>
3911                 </fields>
3912                 <links/>
3913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3914             <actions>
3915                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3916                 <retrieve/>
3917                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3918                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3919             </actions>
3920         </permacrud>
3921         </class>
3922         <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">
3923                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3924                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3925                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3926                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3927                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3928                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3929                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3930                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3931                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3932                 </fields>
3933                 <links>
3934                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3936                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3937                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3938                 </links>
3939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3940                         <actions>
3941                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3942                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3943                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3944                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3945                         </actions>
3946                 </permacrud>
3947         </class>
3948         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3949                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3950                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3951                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3952                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3953                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3954                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3955                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3956                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3957                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3958                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3959                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3960                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3961                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3962                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3963                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3964                 </fields>
3965                 <links>
3966                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3967                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3968                 </links>
3969         </class>
3970         <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">
3971                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3972                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3973                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3974                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3975                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3976                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3977                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3978                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3979                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3980                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3981                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3982                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3983                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3984                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3985                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3986                 </fields>
3987                 <links>
3988                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3989                 </links>
3990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3991                         <actions>
3992                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3993                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3994                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3995                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3996                         </actions>
3997                 </permacrud>
3998         </class>
3999
4000
4001         <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">
4002                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4003                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4004                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4005                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4006                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4007                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4008                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4009                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4010                 </fields>
4011                 <links>
4012                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4013                 </links>
4014         </class>
4015
4016         <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">
4017                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4018                         <field name="call_number" />
4019                         <field name="create_date" reporter:datatype="timestamp"/>
4020                         <field name="creator" reporter:datatype="link"/>
4021                         <field name="id" reporter:datatype="id" />
4022                         <field name="pub" reporter:datatype="bool"/>
4023                         <field name="title"  reporter:datatype="text"/>
4024                         <field name="value"  reporter:datatype="text"/>
4025                 </fields>
4026                 <links>
4027                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4028                 </links>
4029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4030             <actions>
4031                 <create permission="CREATE_VOLUME_NOTE">
4032                     <context link="call_number" field="owning_lib"/>
4033                 </create>
4034                 <retrieve permission="VIEW_VOLUME_NOTES">
4035                     <context link="call_number" field="owning_lib"/>
4036                 </retrieve>
4037                 <update permission="UPDATE_VOLUME_NOTE">
4038                     <context link="call_number" field="owning_lib"/>
4039                 </update>
4040                 <delete permission="DELETE_VOLUME_NOTE">
4041                     <context link="call_number" field="owning_lib"/>
4042                 </delete>
4043             </actions>
4044         </permacrud>
4045         </class>
4046         <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">
4047                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4048                         <field name="create_date" reporter:datatype="timestamp"/>
4049                         <field name="creator" reporter:datatype="link"/>
4050                         <field name="edit_date" reporter:datatype="timestamp"/>
4051                         <field name="editor" reporter:datatype="link"/>
4052                         <field name="id" reporter:datatype="id" />
4053                         <field name="record" reporter:datatype="link"/>
4054                         <field name="value" reporter:datatype="text"/>
4055                 </fields>
4056                 <links>
4057                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4058                 </links>
4059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4060             <actions>
4061                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4062                 <retrieve/>
4063                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4064                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4065             </actions>
4066         </permacrud>
4067         </class>
4068         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4069         <oils_persist:source_definition>
4070 SELECT  usr,
4071         SUM(
4072             CASE
4073                 WHEN (
4074                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4075                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4076                 ) THEN 1
4077                 ELSE 0
4078             END
4079         ) AS out,
4080
4081         SUM(
4082             CASE
4083                 WHEN (
4084                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4085                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4086                 ) THEN 1
4087                 ELSE 0
4088             END
4089         ) AS overdue,
4090
4091         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4092         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4093         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4094   FROM  action.circulation
4095   WHERE checkin_time IS NULL
4096   GROUP BY 1
4097         </oils_persist:source_definition>
4098         <fields oils_persist:primary="usr">
4099             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4100             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4101             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4102             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4103             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4104             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4105         </fields>
4106         <links>
4107             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4108         </links>
4109         </class>
4110         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4111         <oils_persist:source_definition>
4112 SELECT  usr,
4113         STRING_AGG(
4114             CASE
4115                 WHEN (
4116                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4117                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4118                 ) THEN id::TEXT
4119                 ELSE '0'
4120             END
4121         ,',') AS out,
4122
4123         STRING_AGG(
4124             CASE
4125                 WHEN (
4126                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4127                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4128                 ) THEN id::TEXT
4129                 ELSE '0'
4130             END
4131         ,',') AS overdue,
4132
4133         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4134         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4135         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4136   FROM  action.circulation
4137   WHERE checkin_time IS NULL
4138   GROUP BY 1
4139         </oils_persist:source_definition>
4140         <fields oils_persist:primary="usr">
4141             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4142             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4143             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4144             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4145             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4146             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4147         </fields>
4148         <links>
4149             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4150         </links>
4151         </class>
4152         <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">
4153                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4154                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4155                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4156                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4157                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4158                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4159                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4160                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4161                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4162                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4163                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4164                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4165                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4166                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4167                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4168                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4169                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4170                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4171                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4172                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4173                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4174                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4175                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4176                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4177                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4178                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4179                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4180                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4181                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4182                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4183                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4184                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4185                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4186                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4187                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4188                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4189                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4190                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4191                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4192                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4193                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4194                 </fields>
4195                 <links>
4196                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4197                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4198                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4199                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4200                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4201                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4202                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4203                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4204                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4205                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4206                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4207                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4208                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4209                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4210                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4211                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4212                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4213                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4214                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4215                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4216                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4217                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4218                 </links>
4219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4220                         <actions>
4221                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4222                         </actions>
4223                 </permacrud>
4224         </class>
4225         <class id="aacct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_combined_types" oils_persist:tablename="action.all_circulation_combined_types" reporter:core="true" reporter:label="All Circulation Combined Types" oils_persist:readonly="true">
4226                 <fields>
4227                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4228                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4229                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4230                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4231                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4232                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4233                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4234                 </fields>
4235                 <links>
4236                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4237                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4238                 </links>
4239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4240                         <actions>
4241                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4242                         </actions>
4243                 </permacrud>
4244         </class>
4245         <class id="combcirc" controller="open-ils.cstore open-ils.pcrud" 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">
4246                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4247                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4248                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4249                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4250                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4251                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4252                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4253                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4254                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4255                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4256                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4257                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4258                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4259                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4260                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4261                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4262                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4263                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4264                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4265                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4266                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4267                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4268                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4269                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4270                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4271                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4272                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4273                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4274                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4275                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4276                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4277                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4278                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4279                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4280                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4281                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4282                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4283                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4284                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4285                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4286                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4287                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4288                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4289                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4290                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4291                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4292                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4293                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4294                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4295                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4296                 </fields>
4297                 <links>
4298                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4299                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4300                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4301                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4302                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4303                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4304                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4305                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4306                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4307                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4308                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4309                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4310                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4311                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4312                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4313                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4314                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4315                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4316                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4317                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4318                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4319                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4320                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4321                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4322                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4323                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4324                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4325                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4326                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4327                 </links>
4328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4329                         <actions>
4330                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4331                         </actions>
4332                 </permacrud>
4333         </class>
4334         <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">
4335                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4336                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4337                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4338                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4339                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4340                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4341                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4342                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4343                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4344                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4345                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4346                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4347                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4348                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4349                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4350                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4351                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4352                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4353                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4354                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4355                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4356                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4357                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4358                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4359                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4360                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4361                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4362                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4363                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4364                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4365                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4366                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4367                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4368                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4369                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4370                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4371                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4372                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4373                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4374                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4375                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4376                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4377                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4378                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4379                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4380                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4381                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4382                 </fields>
4383                 <links>
4384                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4385                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4386                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4387                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4388                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4389                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4390                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4391                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4392                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4393                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4394                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4395                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4396                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4397                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4398                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4399                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4400                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4401                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4402                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4403                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4404                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4405                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4406                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4407                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4408                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4409                 </links>
4410         </class>
4411         <class id="auch" 
4412                 controller="open-ils.cstore" 
4413                 oils_obj:fieldmapper="action::user_circ_history" 
4414                 oils_persist:tablename="action.usr_circ_history" 
4415                 reporter:label="User Checkout History">
4416                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4417                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4418                         <!-- prevent reporting on the user that owns the checkout history -->
4419                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4420                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4421                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4422                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4423                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4424                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4425                 </fields>
4426                 <links>
4427                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4428                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4429                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4430                 </links>
4431         </class>
4432         <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">
4433                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4434                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4435                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4436                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4437                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4438                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4439                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4440                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4441                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4442                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4443                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4444                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4445                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4446                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4447                 </fields>
4448                 <links>
4449                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4450                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4451                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4452                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4453                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4454                 </links>
4455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4456                         <actions>
4457                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4458                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4459                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4460                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4461                         </actions>
4462                 </permacrud>
4463         </class>
4464
4465         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4466                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4467                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4468                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4469                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4470                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4471                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4472                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4473                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4474                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4475                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4476                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4477                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4478                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4479                 </fields>
4480                 <links>
4481                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4482                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4483                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4484                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4485                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4486                 </links>
4487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4488                         <actions>
4489                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4490                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4491                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4492                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4493                         </actions>
4494                 </permacrud>
4495         </class>
4496         
4497         <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">
4498                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4499                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4500                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4501                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4502                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4503                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4504                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4505                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4506                 </fields>
4507                 <links>
4508                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4509                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4510                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4511                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4512                 </links>
4513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4514                         <actions>
4515                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4516                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4517                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4518                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4519                         </actions>
4520                 </permacrud>
4521         </class>
4522         
4523         <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">
4524                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4525                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4526                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4527                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4528                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4529                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4530                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4531                 </fields>
4532                 <links>
4533                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4534                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4535                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4536                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4537                 </links>
4538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4539                         <actions>
4540                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4541                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4542                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4543                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4544                         </actions>
4545                 </permacrud>
4546         </class>
4547         
4548         <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">
4549                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4550                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4551                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4552                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4553                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4554                 </fields>
4555                 <links>
4556                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4557                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4558                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4559                 </links>
4560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4561                         <actions>
4562                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4563                     <context link="resource" field="owner" />
4564                 </create>
4565                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4566                     <context link="resource" field="owner" />
4567                 </retrieve>
4568                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4569                     <context link="resource" field="owner" />
4570                 </update>
4571                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4572                     <context link="resource" field="owner" />
4573                 </delete>
4574                         </actions>
4575                 </permacrud>
4576         </class>
4577         
4578         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4579                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4580                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4581                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4582                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4583                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4584                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4585                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4586                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4587                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4588                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4589                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4590                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4591                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4592                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4593                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4594                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4595                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4596                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4597                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4598                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4599                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4600                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4601                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4602                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4603                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4604                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4605                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4606                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4607                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4608                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4609                 </fields>
4610                 <links>
4611                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4612                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4613                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4614                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4615                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4616                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4617                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4618                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4619                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4620                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4621                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4622                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4623                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4624                 </links>
4625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4626                         <actions>
4627                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4628                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4629                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4630                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4631                         </actions>
4632                 </permacrud>
4633         </class>
4634         
4635         <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">
4636                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4637                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4638                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4639                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4640                 </fields>
4641                 <links>
4642                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4643                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4644                 </links>
4645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4646                         <actions>
4647                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4648                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4649                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4650                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4651                         </actions>
4652                 </permacrud>
4653         </class>
4654
4655         <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">
4656                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4657                         <field name="bucket" reporter:datatype="link"/>
4658                         <field name="id" reporter:datatype="id" />
4659                         <field name="target_call_number" reporter:datatype="link" />
4660                         <field name="create_time" reporter:datatype="timestamp" />
4661                         <field name="pos" reporter:datatype="int" />
4662                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4663                 </fields>
4664                 <links>
4665                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4666                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4667             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4668                 </links>
4669         </class>
4670         <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">
4671                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4672                         <field name="id" reporter:datatype="id" />
4673                         <field name="item" reporter:datatype="link"/>
4674                         <field name="note" reporter:datatype="text" />
4675                 </fields>
4676                 <links>
4677                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4678                 </links>
4679         </class>
4680         <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">
4681                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4682                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4683                         <field name="btype" reporter:datatype="text"/>
4684                         <field name="id" reporter:datatype="id" />
4685                         <field name="name" reporter:datatype="text"/>
4686                         <field name="description" reporter:datatype="text"/>
4687                         <field name="owner" reporter:datatype="link"/>
4688                         <field name="pub" reporter:datatype="bool"/>
4689                         <field name="create_time" reporter:datatype="timestamp" />
4690                 </fields>
4691                 <links>
4692                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4693                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4694                 </links>
4695         </class>
4696         <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">
4697                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4698                         <field name="id" reporter:datatype="id" />
4699                         <field name="bucket" reporter:datatype="link"/>
4700                         <field name="note" reporter:datatype="text" />
4701                 </fields>
4702                 <links>
4703                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4704                 </links>
4705         </class>
4706         <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">
4707                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4708                         <field name="hold" reporter:datatype="link"/>
4709                         <field name="id" reporter:datatype="id" />
4710                         <field name="target_copy" reporter:datatype="link"/>
4711                         <field name="proximity" reporter:datatype="number"/>
4712                 </fields>
4713                 <links>
4714                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4715                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4716                 </links>
4717         </class>
4718         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4719                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4720                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4721                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4722                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4723                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4724                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4725                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4726                 </fields>
4727                 <links>
4728                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4729                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4730                 </links>
4731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4732             <actions>
4733                 <create permission="CREATE_HOLD_NOTIFICATION">
4734                                         <context link="hold" jump="usr" field="home_ou" />
4735                                 </create>
4736                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4737                                         <context link="hold" jump="usr" field="home_ou" />
4738                                 </retrieve>
4739                 <update permission="CREATE_HOLD_NOTIFICATION">
4740                                         <context link="hold" jump="usr" field="home_ou" />
4741                                 </update>
4742                 <delete permission="CREATE_HOLD_NOTIFICATION">
4743                                         <context link="hold" jump="usr" field="home_ou" />
4744                                 </delete>
4745             </actions>
4746         </permacrud>
4747         </class>
4748         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
4749                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4750                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4751                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4752                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4753                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4754                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4755                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4756                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4757                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4758                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4759                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4760                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4761                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4762                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4763                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4764                 </fields>
4765                 <links>
4766                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4767                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4768                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4769                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4770                 </links>
4771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4772             <actions>
4773                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4774                 <retrieve/>
4775                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4776                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4777             </actions>
4778         </permacrud>
4779         </class>
4780         <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">
4781                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4782                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4783                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4784                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4785                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4786             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4787             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4788             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4789                 </fields>
4790                 <links>
4791                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4792                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4793                 </links>
4794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4795             <actions>
4796                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4797                 <retrieve/>
4798                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4799                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4800             </actions>
4801         </permacrud>
4802         </class>
4803         <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">
4804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4805                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4806             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4807             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4808                 </fields>
4809                 <links>
4810                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4811                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4812                 </links>
4813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4814             <actions>
4815                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4816                                         <context link="lgroup" field="owner" />
4817                 </create>
4818                 <retrieve/>
4819                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4820                                         <context link="lgroup" field="owner" />
4821                 </update>
4822                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4823                                         <context link="lgroup" field="owner" />
4824                 </delete>
4825             </actions>
4826         </permacrud>
4827         </class>
4828
4829     <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">
4830         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4831             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4832             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4833             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4834             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4835         </fields>
4836         <links>
4837             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4838             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4839         </links>
4840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4841             <actions>
4842                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4843                 <retrieve/>
4844                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4845                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4846             </actions>
4847         </permacrud>
4848     </class>
4849
4850         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4851                 <fields>
4852                         <field name="sre_id" oils_persist:virtual="true" />
4853                         <field name="location" oils_persist:virtual="true" />
4854                         <field name="owning_lib" oils_persist:virtual="true" />
4855                         <field name="basic_holdings" oils_persist:virtual="true" />
4856                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4857                         <field name="supplement_holdings" oils_persist:virtual="true" />
4858                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4859                         <field name="index_holdings" oils_persist:virtual="true" />
4860                         <field name="index_holdings_add" oils_persist:virtual="true" />
4861                         <field name="online" oils_persist:virtual="true" />
4862                         <field name="missing" oils_persist:virtual="true" />
4863                         <field name="incomplete" oils_persist:virtual="true" />
4864                 </fields>
4865         </class>
4866
4867         <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">
4868                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4869                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4870                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4871                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4872                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4873                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4874                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4875                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4876                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4877                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4878                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4879                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4880                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4881                 </fields>
4882                 <links>
4883                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4884                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4885                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4886                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4887                 </links>
4888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4889                         <actions>
4890                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4891                                 <retrieve/>
4892                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4893                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4894                         </actions>
4895                 </permacrud>
4896         </class>
4897
4898         <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">
4899                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4901                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4902                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4903                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4904                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4905                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4906                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4907                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4908                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4909                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4910                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4911                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4912                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4913                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4914                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4915                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4916                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4917                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4918                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4919                 </fields>
4920                 <links>
4921                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4922                 </links>
4923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4924                         <actions>
4925                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4926                                         <context link="subscription" field="owning_lib" />
4927                                 </create>
4928                                 <retrieve />
4929                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4930                                         <context link="subscription" field="owning_lib" />
4931                                 </update>
4932                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4933                                         <context link="subscription" field="owning_lib" />
4934                                 </delete>
4935                         </actions>
4936                 </permacrud>
4937         </class>
4938
4939         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4940                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4941                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4942                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4943                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4944                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4945                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4946                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4947                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4948                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4949                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4950                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4951                 </fields>
4952                 <links>
4953                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4954                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4955                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4956                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4957                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4958                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4959                 </links>
4960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4961                         <actions>
4962                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4963                                 <retrieve />
4964                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4965                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4966                         </actions>
4967                 </permacrud>
4968         </class>
4969
4970         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4971                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4972                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4973                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4974                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4975                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4976                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4977                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4978                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4979                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4980                 </fields>
4981                 <links>
4982                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4983                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4984                 </links>
4985         </class>
4986
4987         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4988                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4990                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4991                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4992                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4993                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4994                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4995                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4996                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4997                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4998                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4999                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5000                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5001                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5002                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5003                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5004                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5005                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5006                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5007                 </fields>
5008                 <links>
5009                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5010                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5011                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5012                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5013                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5014                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5015                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5016                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5017                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5018                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5019                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5020                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5021                 </links>
5022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5023                         <actions>
5024                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5025                                 <retrieve />
5026                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5027                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5028                         </actions>
5029                 </permacrud>
5030         </class>
5031
5032         <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">
5033                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5034                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5035                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5036                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5037                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5038                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5039                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5040                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5041                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5042                 </fields>
5043                 <links>
5044                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5045                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5046                 </links>
5047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5048                         <actions>
5049                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5050                                         <context link="distribution" field="holding_lib" />
5051                                 </create>
5052                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5053                                         <context link="distribution" field="holding_lib" />
5054                                 </retrieve>
5055                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5056                                         <context link="distribution" field="holding_lib" />
5057                                 </update>
5058                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5059                                         <context link="distribution" field="holding_lib" />
5060                                 </delete>
5061                         </actions>
5062                 </permacrud>
5063         </class>
5064
5065         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5066                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5067                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5068                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5069                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5070                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5071                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5072                 </fields>
5073                 <links>
5074                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5075                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5076                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5077                 </links>
5078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5079                         <actions>
5080                                 <create permission="ADMIN_SERIAL_STREAM">
5081                                         <context link="distribution" field="holding_lib" />
5082                                 </create>
5083                                 <retrieve />
5084                                 <update permission="ADMIN_SERIAL_STREAM">
5085                                         <context link="distribution" field="holding_lib" />
5086                                 </update>
5087                                 <delete permission="ADMIN_SERIAL_STREAM">
5088                                         <context link="distribution" field="holding_lib" />
5089                                 </delete>
5090                         </actions>
5091                 </permacrud>
5092         </class>
5093
5094         <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">
5095                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5096                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5097                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5098                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5099                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5100                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5101                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5102                 </fields>
5103                 <links>
5104                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5105                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5106                 </links>
5107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5108                         <actions>
5109                                 <create permission="ADMIN_SERIAL_STREAM">
5110                                         <context link="stream" jump="distribution" field="holding_lib" />
5111                                 </create>
5112                                 <retrieve permission="RECEIVE_SERIAL">
5113                                         <context link="stream" jump="distribution" field="holding_lib" />
5114                                 </retrieve>
5115                                 <update permission="ADMIN_SERIAL_STREAM">
5116                                         <context link="stream" jump="distribution" field="holding_lib" />
5117                                 </update>
5118                                 <delete permission="ADMIN_SERIAL_STREAM">
5119                                         <context link="stream" jump="distribution" field="holding_lib" />
5120                                 </delete>
5121                         </actions>
5122                 </permacrud>
5123         </class>
5124
5125         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5126                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5127                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5128                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5129                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5130                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5131                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5132                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5133                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5134                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5135                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5136                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5137                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5138                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5139                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5140                 </fields>
5141                 <links>
5142                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5143                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5144                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5145                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5146                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5147                 </links>
5148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5149                         <actions>
5150                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5151                                         <context link="subscription" field="owning_lib" />
5152                                 </create>
5153                                 <retrieve/>
5154                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5155                                         <context link="subscription" field="owning_lib" />
5156                                 </update>
5157                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5158                                         <context link="subscription" field="owning_lib" />
5159                                 </delete>
5160                         </actions>
5161                 </permacrud>
5162         </class>
5163
5164         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5165                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5166                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5167                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5168                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5169                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5170                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5171                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5172                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5173                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5174                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5175                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5176                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5177                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5178                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5179                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5180                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5181                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5182                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5183                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5184                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5185                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5186                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5187                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5188                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5189                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5190                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5191                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5192                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5193                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5194                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5195                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5196                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5197                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5198                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5199                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5200                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5201                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5202                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5203                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5204                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5205                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5206                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5207                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5208                 </fields>
5209                 <links>
5210                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5211                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5212                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5213                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5214                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5215                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5216                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5217                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5218                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5219                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5220                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5221                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5222                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5223                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5224                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5225                 </links>
5226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5227                         <actions>
5228                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5229                                 <retrieve/>
5230                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5231                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5232                         </actions>
5233                 </permacrud>
5234         </class>
5235
5236         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5237                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5238                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5239                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5240                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5241                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5242                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5243                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5244                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5245                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5246                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5247                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5248                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5249                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5250                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5251                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5252                 </fields>
5253                 <links>
5254                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5255                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5256                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5257                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5258                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5259                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5260                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5261                 </links>
5262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5263                         <actions>
5264                                 <create permission="ADMIN_SERIAL_ITEM">
5265                                         <context link="stream" jump="distribution" field="holding_lib" />
5266                                 </create>
5267                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5268                                         <context link="stream" jump="distribution" field="holding_lib" />
5269                                 </retrieve>
5270                                 <update permission="ADMIN_SERIAL_ITEM">
5271                                         <context link="stream" jump="distribution" field="holding_lib" />
5272                                 </update>
5273                                 <delete permission="ADMIN_SERIAL_ITEM">
5274                                         <context link="stream" jump="distribution" field="holding_lib" />
5275                                 </delete>
5276                         </actions>
5277                 </permacrud>
5278         </class>
5279
5280         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5281                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5282                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5283                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5284                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5285                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5286                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5287                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5288                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5289                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5290                 </fields>
5291                 <links>
5292                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5293                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5294                 </links>
5295                 <!-- Not available via PCRUD at this time -->
5296         </class>
5297         <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">
5298                 <fields>
5299                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5300                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5301                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5302                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5303                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5304                 </fields>
5305                 <links>
5306                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5307                 </links>
5308         </class>
5309         <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">
5310                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5311                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5312                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5313                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5314                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5315                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5316                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5317                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5318                 </fields>
5319                 <links>
5320                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5321                 </links>
5322         </class>
5323         <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">
5324                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5325                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5326                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5327                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5328                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5329                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5330                 </fields>
5331                 <links>
5332                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5333                 </links>
5334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5335                         <actions>
5336                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5337                                         <context link="distribution" field="holding_lib" />
5338                                 </create>
5339                                 <retrieve/>
5340                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5341                                         <context link="distribution" field="holding_lib" />
5342                                 </update>
5343                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5344                                         <context link="distribution" field="holding_lib" />
5345                                 </delete>
5346                         </actions>
5347                 </permacrud>
5348         </class>
5349
5350         <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">
5351                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5352                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5353                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5354                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5355                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5356                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5357                 </fields>
5358                 <links>
5359                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5360                 </links>
5361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5362                         <actions>
5363                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5364                                         <context link="distribution" field="holding_lib" />
5365                                 </create>
5366                                 <retrieve/>
5367                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5368                                         <context link="distribution" field="holding_lib" />
5369                                 </update>
5370                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5371                                         <context link="distribution" field="holding_lib" />
5372                                 </delete>
5373                         </actions>
5374                 </permacrud>
5375         </class>
5376
5377         <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">
5378                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5379                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5380                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5381                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5382                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5383                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5384                 </fields>
5385                 <links>
5386                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5387                 </links>
5388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5389                         <actions>
5390                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5391                                         <context link="distribution" field="holding_lib" />
5392                                 </create>
5393                                 <retrieve/>
5394                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5395                                         <context link="distribution" field="holding_lib" />
5396                                 </update>
5397                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5398                                         <context link="distribution" field="holding_lib" />
5399                                 </delete>
5400                         </actions>
5401                 </permacrud>
5402         </class>
5403
5404         <class id="ascecm" controller="open-ils.cstore open-ils.pcrud" 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">
5405                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5406                         <field name="id" reporter:datatype="id" />
5407                         <field name="owning_copy" reporter:datatype="link"/>
5408                         <field name="stat_cat" reporter:datatype="link"/>
5409                         <field name="stat_cat_entry" reporter:datatype="link"/>
5410                 </fields>
5411                 <links>
5412                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5413                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5414                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5415                 </links>
5416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5417                         <actions>
5418                                 <retrieve/>
5419                         </actions>
5420                 </permacrud>
5421         </class>
5422         <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">
5423                 <fields oils_persist:primary="code">
5424                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5425                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5426                 </fields>
5427                 <links/>
5428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5429             <actions>
5430                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5431                 <retrieve/>
5432                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5433                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5434             </actions>
5435         </permacrud>
5436         </class>
5437         <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">
5438                 <fields oils_persist:primary="code">
5439                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5440                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5441                 </fields>
5442                 <links/>
5443         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5444             <actions>
5445                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5446                 <retrieve/>
5447                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5448                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5449             </actions>
5450         </permacrud>
5451         </class>
5452         <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">
5453                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5454                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5455                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5456                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5457                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5458                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5459                 </fields>
5460                 <links>
5461             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5462         </links>
5463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5464             <actions>
5465                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5466                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5467                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5468                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5469             </actions>
5470         </permacrud>
5471         </class>
5472         <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">
5473                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5474                         <field name="id" reporter:datatype="id" />
5475                         <field name="name" reporter:datatype="text"/>
5476                 </fields>
5477                 <links/>
5478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5479             <actions>
5480                 <create permission="CREATE_LASSO" global_required="true"/>
5481                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5482                 <update permission="UPDATE_LASSO" global_required="true"/>
5483                 <delete permission="DELETE_LASSO" global_required="true"/>
5484             </actions>
5485         </permacrud>
5486         </class>
5487         <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">
5488                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5489                         <field name="id" reporter:datatype="id" />
5490                         <field name="lasso" reporter:datatype="link"/>
5491                         <field name="org_unit" reporter:datatype="org_unit"/>
5492                 </fields>
5493                 <links>
5494                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5495                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5496                 </links>
5497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5498             <actions>
5499                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5500                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5501                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5502                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5503             </actions>
5504         </permacrud>
5505         </class>
5506         <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">
5507                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5508                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5509                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5510                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5511                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5512                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5513                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5514                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5515                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5516                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5517                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5518                 </fields>
5519                 <links>
5520                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5521                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5522                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5523                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5524                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5525                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5526                 </links>
5527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5528             <actions>
5529                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5530                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5531                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5532                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5533             </actions>
5534         </permacrud>
5535         </class>
5536         <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">
5537                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5538                         <field name="id" reporter:datatype="id" />
5539                         <field name="from_org" reporter:datatype="org_unit"/>
5540                         <field name="to_org" reporter:datatype="org_unit"/>
5541                         <field name="prox" reporter:datatype="int" />
5542                 </fields>
5543                 <links>
5544                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5545                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5546                 </links>
5547         </class>
5548         <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">
5549                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5550                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5551                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5552                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5553                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5554                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5555                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5556                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5557                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5558                 </fields>
5559                 <links/>
5560         </class>
5561         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5562                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5563                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5564                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5565                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5566                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5567                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5568                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5569                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5570                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5571                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5572                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5573                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5574                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5575                 </fields>
5576                 <links>
5577                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5578                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5579                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5580                 </links>
5581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5582             <actions>
5583                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5584                 <retrieve/>
5585                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5586                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5587             </actions>
5588         </permacrud>
5589         </class>
5590         <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">
5591                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5592                         <field name="address_type"  reporter:datatype="text"/>
5593                         <field name="city"  reporter:datatype="text"/>
5594                         <field name="country"  reporter:datatype="text"/>
5595                         <field name="county"  reporter:datatype="text"/>
5596                         <field name="id" reporter:datatype="id" />
5597                         <field name="org_unit" reporter:datatype="org_unit"/>
5598                         <field name="post_code"  reporter:datatype="text"/>
5599                         <field name="state"  reporter:datatype="text"/>
5600                         <field name="street1"  reporter:datatype="text"/>
5601                         <field name="street2"  reporter:datatype="text"/>
5602                         <field name="valid" reporter:datatype="bool"/>
5603                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5604                 </fields>
5605                 <links>
5606                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5607                 </links>
5608         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5609             <actions>
5610                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5611                 <retrieve/>
5612                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5613                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5614             </actions>
5615         </permacrud>
5616         </class>
5617         <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">
5618                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5619                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5620                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5621                         <field name="query_text" reporter:datatype="text"/>
5622                 </fields>
5623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5624             <actions>
5625                 <retrieve/>
5626             </actions>
5627         </permacrud>
5628         </class>
5629
5630         <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">
5631                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5632                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5633                         <field name="owner" reporter:datatype="org_unit"/>
5634                         <field name="code" reporter:datatype="text"/>
5635                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5636                         <field name="create_date" reporter:datatype="timestamp"/>
5637                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5638                 </fields>
5639                 <links>
5640                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5641                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5642                 </links>
5643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5644             <actions>
5645                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5646                 <retrieve/>
5647                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5648                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5649             </actions>
5650         </permacrud>
5651         </class>
5652         <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">
5653                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5654                         <field name="id" reporter:datatype="id"/>
5655                         <field name="grp" reporter:datatype="link"/>
5656                         <field name="pos" reporter:datatype="int"/>
5657                         <field name="query" reporter:datatype="link"/>
5658                 </fields>
5659                 <links>
5660                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5661                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5662                 </links>
5663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5664             <actions>
5665                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5666                     <context link="grp" field="owner"/>
5667                 </create>
5668                 <retrieve/>
5669                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5670                     <context link="grp" field="owner"/>
5671                 </update>
5672                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5673                     <context link="grp" field="owner"/>
5674                 </delete>
5675             </actions>
5676         </permacrud>
5677         </class>
5678
5679         <!-- A note: Please update alhr and ahopl when updating ahr -->
5680         <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">
5681                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5682                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5683                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5684                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5685                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5686                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5687                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5688                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5689                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5690                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5691                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5692                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5693                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5694                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5695                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5696                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5697                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5698                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5699                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5700                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5701                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5702                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5703                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5704                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5705                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5706                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5707                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5708                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5709                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5710                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5711                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5712                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5713                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5714                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5715                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5716                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5717                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5718                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5719                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5720                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5721                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5722                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5723                 </fields>
5724                 <links>
5725                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5726                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5727                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5728                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5729                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5730                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5731                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5732                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5733                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5734                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5735                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5736                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5737                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5738                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5739                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5740                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5741                 </links>
5742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5743                         <actions>
5744                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5745                         </actions>
5746                 </permacrud>
5747         </class>
5748         <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">
5749                 <oils_persist:source_definition><![CDATA[
5750                 SELECT
5751                         ahr.*,
5752                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5753                                 copy_location_order_position,
5754                         CASE WHEN au.alias IS NOT NULL THEN
5755                                 au.alias
5756                         ELSE
5757                                 au.first_given_name
5758                         END AS usr_alias_or_first_given_name,
5759                         au.first_given_name AS usr_first_given_name,
5760                         au.second_given_name AS usr_second_given_name,
5761                         au.family_name AS usr_family_name,
5762                         au.prefix AS usr_prefix,
5763                         au.suffix AS usr_suffix,
5764                         au.alias AS usr_alias,
5765                         CASE WHEN au.alias IS NOT NULL THEN
5766                                 au.alias
5767                         ELSE
5768                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5769                                         COALESCE(au.family_name, ''),
5770                                         COALESCE(au.suffix, ''),
5771                                         ', ',
5772                                         COALESCE(au.prefix, ''),
5773                                         COALESCE(au.first_given_name, ''),
5774                                         COALESCE(au.second_given_name, '')
5775                                 ], ' '), E'\\s+,', ',')
5776                         END AS usr_alias_or_display_name,
5777                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5778                                 COALESCE(au.family_name, ''),
5779                                 COALESCE(au.suffix, ''),
5780                                 ', ',
5781                                 COALESCE(au.prefix, ''),
5782                                 COALESCE(au.first_given_name, ''),
5783                                 COALESCE(au.second_given_name, '')
5784                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5785                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5786                                 AS call_number_label,
5787                         siss.label AS issuance_label,
5788                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5789                         ahcm_1.copy_count AS potential_copies
5790                 FROM action.hold_request ahr
5791                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5792                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5793                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5794                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5795                 JOIN actor.usr au ON (au.id = ahr.usr)
5796                 JOIN (
5797                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5798                         FROM asset.copy_location
5799                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5800                 LEFT JOIN actor.usr_standing_penalty ausp 
5801                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5802                 LEFT JOIN config.standing_penalty csp
5803                         ON (
5804                                 csp.id = ausp.standing_penalty AND 
5805                                 csp.block_list LIKE '%CAPTURE%' AND (
5806                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5807                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5808                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5809                                         )
5810                                 )
5811                         )
5812                 JOIN (
5813                         SELECT COUNT(target_copy) AS copy_count, hold
5814                         FROM action.hold_copy_map
5815                         GROUP BY 2
5816                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5817                 LEFT JOIN serial.issuance siss
5818                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5819                 LEFT JOIN asset.copy_location_order acplo
5820                         ON (acp.location = acplo.location AND
5821                                 acp.circ_lib = acplo.org)
5822                 WHERE
5823                         ahr.capture_time IS NULL AND
5824                         ahr.cancel_time IS NULL AND
5825                         csp.id IS NULL AND
5826                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5827                         acp.status IN (0,7)
5828                 ]]></oils_persist:source_definition>
5829                 <fields oils_persist:primary="id">
5830                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5831                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5832                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5833                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5834                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5835                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5837                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5838                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5839                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5840                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5841                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5842                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5843                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5844                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5845                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5846                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5847                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5848                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5849                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5850                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5851                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5852                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5853                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5854                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5855                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5856                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5857                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5858                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5859                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5860                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5861                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5862                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5863                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5864                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5865                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5866                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5867                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5868                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5869                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5870                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5871                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5872                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5873                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5874                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5875                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5876                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5877                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5878                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5879                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5880                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5881                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5882                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5883                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5884                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5885                 </fields>
5886                 <links>
5887                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5888                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5889                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5890                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5891                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5892                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5893                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5894                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5895                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5896                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5897                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5898                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5899                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5900                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5901                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5902                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5903                 </links>
5904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5905                         <actions>
5906                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5907                         </actions>
5908                 </permacrud>
5909         </class>
5910         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5911                 <oils_persist:source_definition>
5912                         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 AND current_copy IS NOT NULL AND fulfillment_time IS NULL GROUP BY current_copy)x USING (current_copy, capture_time)
5913                 </oils_persist:source_definition>
5914                 <fields oils_persist:primary="id">
5915                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5916                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5917                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5918                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5919                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5920                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5921                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5922                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5923                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5924                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5925                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5926                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5927                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5928                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5929                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5930                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5931                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5932                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5933                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5934                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5935                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5936                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5937                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5938                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5939                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5940                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5941                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5942                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5943                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5944                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5945                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5946                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5947                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5948                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5949                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5950                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5951                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5952                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5953                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5954                 </fields>
5955                 <links>
5956                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5957                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5958                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5959                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5960                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5961                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5962                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5963                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5964                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5965                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5966                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5967                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5968                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5969                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5970                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5971                 </links>
5972         </class>
5973
5974         <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">
5975                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5976                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5977                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5978                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5979                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5980                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5981                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5982                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5983                 </fields>
5984                 <links>
5985                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5986                 </links>
5987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5988                         <actions>
5989                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5990                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5991                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5992                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5993                         </actions>
5994                 </permacrud>
5995         </class>
5996         <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">
5997                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5998                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5999                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6000                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6001                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6002                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6003                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6004                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6005                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6006                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6007                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6008                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6009                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6010                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6011                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6012                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6013                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6014                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6015                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6016                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6017                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6018                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6019                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6020                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6021                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6022                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6023                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6024                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6025                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6026                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6027                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6028                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6029                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6030                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6031                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6032                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6033                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6034                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6035                 </fields>
6036                 <links>
6037                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6038                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6039                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6040                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6041                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6042                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6043                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6044                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6045                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6046                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6047                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6048                 </links>
6049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6050                         <actions>
6051                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6052                         </actions>
6053                 </permacrud>
6054         </class>
6055         <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">
6056                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6057                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6058                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6059                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6060                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6061                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6062                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6063                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6064                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6065                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6066                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6067                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6068                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6069                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6070                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6071                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6072                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6073                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6074                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6075                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6076                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6077                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6078                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6079                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6080                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6081                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6082                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6083                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6084                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6085                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6086                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6087                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6088                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6089                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6090                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6091                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6092                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6093                 </fields>
6094                 <links>
6095                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6096                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6097                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6098                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6099                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6100                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6101                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6102                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6103                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6104                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6105                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6106                 </links>
6107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6108                         <actions>
6109                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6110                         </actions>
6111                 </permacrud>
6112         </class>
6113
6114         <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">
6115                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6116                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6117                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6118                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6119                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6120                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6121                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6122                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6123                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6124                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6125                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6126                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6127                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6128                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6129                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6130                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6132                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6133                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6134                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6135                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6136                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6137                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6138                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6139                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6140                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6141                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6142                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6143                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6144                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6145                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6146                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6147                 </fields>
6148                 <links>
6149                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6150                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6151                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6152                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6153                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6154                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6155                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6156                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6157                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6158                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6159                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6160                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6161                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6162                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6163                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6164                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6165                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6166                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6167                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6168                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6169                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6170                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6171                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6172                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6173                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6174                 </links>
6175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6176             <actions>
6177                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6178                 <retrieve />
6179                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6180                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6181             </actions>
6182         </permacrud>
6183         </class>
6184         <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">
6185                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6186                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6187                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6188                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6189                 </fields>
6190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6191                         <actions>
6192                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6193                                 <retrieve/>
6194                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6195                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6196                         </actions>
6197                 </permacrud>
6198         </class>
6199         <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">
6200                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6201                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6202                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6203                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6204                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6205                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6206                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6207                 </fields>
6208                 <links>
6209                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6210                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6211                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6212                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6213                 </links>
6214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6215                         <actions>
6216                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6217                                 <retrieve/>
6218                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6219                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6220                         </actions>
6221                 </permacrud>
6222         </class>
6223         <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">
6224                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6225                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6226                         <field name="btype" reporter:datatype="text"/>
6227                         <field name="id" reporter:datatype="id" />
6228                         <field name="name"  reporter:datatype="text"/>
6229                         <field name="description" reporter:datatype="text"/>
6230                         <field name="owner" reporter:datatype="link"/>
6231                         <field name="pub" reporter:datatype="bool"/>
6232                         <field name="create_time" reporter:datatype="timestamp" />
6233                 </fields>
6234                 <links>
6235                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6236                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6237                 </links>
6238         </class>
6239         <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">
6240                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6241                         <field name="id" reporter:datatype="id" />
6242                         <field name="bucket" reporter:datatype="link"/>
6243                         <field name="note" reporter:datatype="text" />
6244                 </fields>
6245                 <links>
6246                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6247                 </links>
6248         </class>
6249         <class id="asc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6250                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6251                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6252                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6253                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6254                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6255                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6256                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6257                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6258                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6259                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6260                 </fields>
6261                 <links>
6262                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6263                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6264                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6265                 </links>
6266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6267                         <actions>
6268                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6269                         </actions>
6270                 </permacrud>
6271         </class>
6272         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6273                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6274                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6275                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6276                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6277                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6278                 </fields>
6279                 <links>
6280                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6281                 </links>
6282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6283                         <actions>
6284                                 <retrieve permission="VIEW_USER">
6285                                         <context link="usr" field="home_ou" />
6286                                 </retrieve>
6287                         </actions>
6288                 </permacrud>
6289         </class>
6290     <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">
6291         <fields oils_persist:primary="field">
6292             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6293             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6294             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6295         </fields>
6296         <links/>
6297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6298             <actions>
6299                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6300                 <retrieve />
6301                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6302                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6303             </actions>
6304         </permacrud>
6305     </class>
6306         <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">
6307                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6308                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6309                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6310                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6311                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6312                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6313                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6314                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6315                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6316                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6317                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6318                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6319                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6320                 </fields>
6321                 <links>
6322                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6323                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6324                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6325                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6326                 </links>
6327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6328             <actions>
6329                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6330                 <retrieve />
6331                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6332                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6333             </actions>
6334         </permacrud>
6335         </class>
6336         <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">
6337                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6338                         <field name="field" reporter:datatype="link"/>
6339                         <field name="id" reporter:datatype="id" />
6340                         <field name="source" reporter:datatype="link"/>
6341                         <field name="value"  reporter:datatype="text"/>
6342                 </fields>
6343                 <links>
6344                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6345                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6346                 </links>
6347         </class>
6348         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6349                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6350                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6351                         <field name="btype" reporter:datatype="text"/>
6352                         <field name="id" reporter:datatype="id" />
6353                         <field name="name"  reporter:datatype="text"/>
6354                         <field name="description" reporter:datatype="text"/>
6355                         <field name="owner" reporter:datatype="link"/>
6356                         <field name="pub" reporter:datatype="bool"/>
6357                         <field name="create_time" reporter:datatype="timestamp" />
6358                 </fields>
6359                 <links>
6360                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6361                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6362                 </links>
6363         </class>
6364         <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">
6365                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6366                         <field name="id" reporter:datatype="id" />
6367                         <field name="bucket" reporter:datatype="link"/>
6368                         <field name="note" reporter:datatype="text" />
6369                 </fields>
6370                 <links>
6371                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6372                 </links>
6373         </class>
6374         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
6375                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6376                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6377                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6378                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6379                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6380                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6381                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6382                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6383                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6384                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6385                 </fields>
6386                 <links>
6387                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6388                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6389                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6390                 </links>
6391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6392             <actions>
6393                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6394                     <context link="xact" jump="usr" field="home_ou"/>
6395                 </retrieve>
6396                         </actions>
6397                 </permacrud>
6398         </class>
6399         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6400                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6401                         <field name="id" reporter:datatype="id" />
6402                         <field name="ind1" />
6403                         <field name="ind2" />
6404                         <field name="record" />
6405                         <field name="subfield" />
6406                         <field name="tag" />
6407                         <field name="value" />
6408                 </fields>
6409                 <links>
6410                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6411                 </links>
6412         </class>
6413         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
6414                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6415                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6416                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6417                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6418                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6419                 </fields>
6420                 <links>
6421                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6422                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6423                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6424                 </links>
6425         </class>
6426         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
6427                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6428                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6429                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6430                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6431                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6432                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6433                 </fields>
6434                 <links>
6435                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6436                 </links>
6437         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6438             <actions>
6439                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6440                 <retrieve/>
6441                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6442                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6443             </actions>
6444         </permacrud>
6445
6446         </class>
6447         <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">
6448                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6449                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6450                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6451                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6452                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6453                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6454                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6455                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6456                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6457                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6458                 </fields>
6459                 <links>
6460                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6461                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6462                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6463                 </links>
6464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6465             <actions>
6466                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6467                 <retrieve/>
6468                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6469                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6470             </actions>
6471         </permacrud>
6472         </class>
6473         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6474                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6475                         <field name="create_date" reporter:datatype="timestamp"/>
6476                         <field name="creator" reporter:datatype="link"/>
6477                         <field name="edit_date" reporter:datatype="timestamp"/>
6478                         <field name="editor" reporter:datatype="link"/>
6479                         <field name="id" reporter:datatype="id" />
6480                         <field name="pub" reporter:datatype="bool"/>
6481                         <field name="record" reporter:datatype="link"/>
6482                         <field name="value"  reporter:datatype="text"/>
6483                 </fields>
6484                 <links>
6485                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6486                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6487                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6488                 </links>
6489         </class>
6490         <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">
6491                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6492                         <field name="balance_owed" reporter:datatype="money" />
6493                         <field name="total_owed" reporter:datatype="money" />
6494                         <field name="total_paid" reporter:datatype="money" />
6495                         <field name="usr" reporter:datatype="link"/>
6496                 </fields>
6497                 <links>
6498                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6499                 </links>
6500         </class>
6501         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6502                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6503                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6504                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6505                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6506                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6507                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6508                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6509                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6510                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6511                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6512                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6513                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6514                 </fields>
6515                 <links>
6516                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6517                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6518                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6519                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6520                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6521                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6522                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6523                 </links>
6524         </class>
6525         <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">
6526                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6527                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6528                         <field name="quality" reporter:datatype="int" />
6529                         <field name="source" reporter:datatype="text"/>
6530                         <field name="transcendant" reporter:datatype="bool"/>
6531                         <field name="can_have_copies" reporter:datatype="bool"/>
6532                 </fields>
6533                 <links/>
6534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6535             <actions>
6536                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6537                 <retrieve/>
6538                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6539                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6540             </actions>
6541         </permacrud>
6542         </class>
6543         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6544                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6545                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6546                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6547                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6548                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6549                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6550                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6551                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6552                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6553                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6554                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6555                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6556                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6557                 </fields>
6558                 <links>
6559                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6560                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6561                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6562                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6563                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6564                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6565                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6566                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6567                 </links>
6568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6569                         <actions>
6570                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6571                                         <context link="usr" field="home_ou" />
6572                                 </retrieve>
6573                         </actions>
6574                 </permacrud>
6575         </class>
6576         <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">
6577                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6578                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6579                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6580                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6581                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6582                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6583                 </fields>
6584                 <links>
6585                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6586                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6587                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6588                 </links>
6589         </class>
6590         <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">
6591                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6592                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6593                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6594                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6595                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6596                 </fields>
6597                 <links>
6598                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6599                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6600                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6601                 </links>
6602         </class>
6603         <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">
6604                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6605                         <field name="bucket" reporter:datatype="link"/>
6606                         <field name="id" reporter:datatype="id" />
6607                         <field name="target_user" reporter:datatype="link"/>
6608                         <field name="create_time" reporter:datatype="timestamp" />
6609                         <field name="pos" reporter:datatype="int" />
6610                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6611                 </fields>
6612                 <links>
6613                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6614                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6615             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6616                 </links>
6617         </class>
6618         <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">
6619                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6620                         <field name="id" reporter:datatype="id" />
6621                         <field name="item" reporter:datatype="link"/>
6622                         <field name="note" reporter:datatype="text" />
6623                 </fields>
6624                 <links>
6625                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6626                 </links>
6627         </class>
6628         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6629                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6630                         <field name="balance_owed" reporter:datatype="money" />
6631                         <field name="total_owed" reporter:datatype="money" />
6632                         <field name="total_paid" reporter:datatype="money" />
6633                         <field name="usr" reporter:datatype="link"/>
6634                 </fields>
6635                 <links>
6636                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6637                 </links>
6638         </class>
6639         <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">
6640                 <fields oils_persist:primary="code" oils_persist:sequence="">
6641                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6642                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6643                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6644                 </fields>
6645                 <links/>
6646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6647             <actions>
6648                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6649                 <retrieve/>
6650                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6651                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6652             </actions>
6653         </permacrud>
6654         </class>
6655         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6656                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6657                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6658                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6659                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6660                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6661                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6662                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6663                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6664                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6665                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6666                 </fields>
6667                 <links>
6668                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6669                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6670                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6671                 </links>
6672         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6673             <actions>
6674                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6675                     <context link="xact" jump="usr" field="home_ou"/>
6676                 </retrieve>
6677                         </actions>
6678                 </permacrud>
6679         </class>
6680         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6681                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6682                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6683                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6684                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6685                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6686                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6687                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6688                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6689                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6690                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6691                 </fields>
6692                 <links>
6693                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6694                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6695                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6696                 </links>
6697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6698             <actions>
6699                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6700                     <context link="xact" jump="usr" field="home_ou"/>
6701                 </retrieve>
6702                         </actions>
6703                 </permacrud>
6704         </class>
6705         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6706                 <fields oils_persist:primary="id" oils_persist:sequence="">
6707                         <field name="checkin_lib" reporter:datatype="link"/>
6708                         <field name="checkin_staff" reporter:datatype="link"/>
6709                         <field name="checkin_time" reporter:datatype="timestamp"/>
6710                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6711                         <field name="circ_staff" reporter:datatype="link"/>
6712                         <field name="desk_renewal" reporter:datatype="bool"/>
6713                         <field name="due_date" reporter:datatype="timestamp"/>
6714                         <field name="duration" reporter:datatype="interval"/>
6715                         <field name="duration_rule" reporter:datatype="link"/>
6716                         <field name="fine_interval" reporter:datatype="interval"/>
6717                         <field name="id" reporter:datatype="id" />
6718                         <field name="max_fine" reporter:datatype="money" />
6719                         <field name="max_fine_rule" reporter:datatype="link"/>
6720                         <field name="opac_renewal" reporter:datatype="bool"/>
6721                         <field name="phone_renewal" reporter:datatype="bool"/>
6722                         <field name="recurring_fine" reporter:datatype="money" />
6723                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6724                         <field name="renewal_remaining" reporter:datatype="int" />
6725             <field name="grace_period" reporter:datatype="interval" />
6726                         <field name="stop_fines" reporter:datatype="text"/>
6727                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6728                         <field name="target_copy" reporter:datatype="link"/>
6729                         <field name="usr" reporter:datatype="link"/>
6730                         <field name="xact_finish" reporter:datatype="timestamp" />
6731                         <field name="xact_start" reporter:datatype="timestamp" />
6732                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6733                 </fields>
6734                 <links>
6735                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6736                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6737                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6738                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6739                 </links>
6740         </class>
6741         <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">
6742                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6743                         <field name="field" reporter:datatype="link"/>
6744                         <field name="id" reporter:datatype="id" />
6745                         <field name="source" reporter:datatype="link"/>
6746                         <field name="value" reporter:datatype="text"/>
6747                 </fields>
6748                 <links>
6749                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6750                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6751                 </links>
6752         </class>
6753         <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">
6754                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6755                         <field name="high" reporter:datatype="money" />
6756                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6757                         <field name="low" reporter:datatype="money" />
6758                         <field name="name" reporter:datatype="text"/>
6759                         <field name="normal" reporter:datatype="money" />
6760                         <field name="recurrence_interval" reporter:datatype="interval"/>
6761             <field name="grace_period" reporter:datatype="interval" />
6762                 </fields>
6763                 <links/>
6764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6765             <actions>
6766                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6767                 <retrieve/>
6768                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6769                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6770             </actions>
6771         </permacrud>
6772         </class>
6773         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6774                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6775                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6776                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6777                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6778                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6779                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6780                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6781                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6782                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6783                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6784                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6785                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6786                 </fields>
6787                 <links>
6788                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6789                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6790                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6791                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6792                 </links>
6793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6794             <actions>
6795                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6796                     <context link="xact" jump="usr" field="home_ou"/>
6797                 </retrieve>
6798                         </actions>
6799                 </permacrud>
6800         </class>
6801         <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">
6802                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6803                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6804                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6805                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6806                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6807                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6808                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6809                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6810                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6811                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6812                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6813                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6814                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6815                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6816                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6817                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6818                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6819                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6820                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6821                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6822                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6823                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6824                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6825                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6826                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6827                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6828                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6829                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6830                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6831                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6832                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6833                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6834                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6835                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6836                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6837                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6838                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6839                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6840                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6841                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6842                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6843                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6844                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6845                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6846                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6847                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6848                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6849                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6850                 </fields>
6851                 <links>
6852                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6853                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6854                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6855                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6856                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6857                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6858                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6859                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6860                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6861                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6862                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6863                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6864                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6865                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6866                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6867                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6868                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6869                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6870                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6871                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6872                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6873                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6874                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6875                 </links>
6876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6877             <actions>
6878                 <create permission="CREATE_COPY">
6879                     <context link="call_number" field="owning_lib"/>
6880                 </create>
6881                 <retrieve/>
6882                 <update permission="UPDATE_COPY">
6883                     <context link="call_number" field="owning_lib"/>
6884                 </update>
6885                 <delete permission="DELETE_COPY">
6886                     <context link="call_number" field="owning_lib"/>
6887                 </delete>
6888             </actions>
6889         </permacrud>
6890         </class>
6891
6892         <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">
6893                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6894                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6895                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6896                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6897                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6898                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6899                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6900                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6901                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6902                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6903                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6904                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6905                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6906                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6907                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6908                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6909                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6910                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6911                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6912                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6913                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6914                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6915                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6916                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6917                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6918                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6919                 </fields>
6920                 <links>
6921                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6922                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6923                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6924                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6925                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6926                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6927                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6928                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6929                 </links>
6930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6931                         <actions>
6932                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6933                                 <retrieve />
6934                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6935                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6936                         </actions>
6937                 </permacrud>
6938         </class>
6939
6940         <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">
6941                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6942                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6943                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6944                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6945                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6946                 </fields>
6947                 <links/>
6948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6949             <actions>
6950                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6951                 <retrieve/>
6952                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6953                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6954             </actions>
6955         </permacrud>
6956         </class>
6957         <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">
6958                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6959                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6960                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6961                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6962                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6963                 </fields>
6964                 <links/>
6965         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6966             <actions>
6967                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6968                 <retrieve/>
6969                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6970                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6971             </actions>
6972         </permacrud>
6973         </class>
6974         <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">
6975                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6976                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6977                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6978                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6979                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6980                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6981                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6982                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6983                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6984                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6985                 </fields>
6986                 <links>
6987                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6988                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6989                 </links>
6990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6991             <actions>
6992                 <create permission="CREATE_PERM" global_required="true"/>
6993                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6994                 <update permission="UPDATE_PERM" global_required="true"/>
6995                 <delete permission="DELETE_PERM" global_required="true"/>
6996             </actions>
6997         </permacrud>
6998         </class>
6999         <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">
7000                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7001                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7002                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7003                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7004                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7005                 </fields>
7006                 <links>
7007                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7008                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7009                 </links>
7010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7011             <actions>
7012                 <create permission="ADMIN_SURVEY">
7013                     <context link="question" jump="survey" field="owner"/>
7014                 </create>
7015                 <retrieve/>
7016                 <update permission="ADMIN_SURVEY">
7017                     <context link="question" jump="survey" field="owner"/>
7018                 </update>
7019                 <delete permission="ADMIN_SURVEY">
7020                     <context link="question" jump="survey" field="owner"/>
7021                 </delete>
7022             </actions>
7023         </permacrud>
7024         </class>
7025         <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
7026                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7027                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7028                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7029                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7030                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7031                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7032                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7033                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7034                 </fields>
7035                 <links>
7036                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7037                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7038                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7039                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7040                 </links>
7041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7042                         <actions>
7043                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7044                         </actions>
7045                 </permacrud>
7046         </class>
7047         <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">
7048                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7049                         <field name="balance_owed" reporter:datatype="money" />
7050                         <field name="total_owed" reporter:datatype="money" />
7051                         <field name="total_paid" reporter:datatype="money" />
7052                         <field name="usr" reporter:datatype="link"/>
7053                 </fields>
7054                 <links>
7055                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7056                 </links>
7057         </class>
7058         <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">
7059                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7060                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7061                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7062                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7063                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7064                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7065                 </fields>
7066                 <links>
7067                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7068                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7069                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7070                 </links>
7071         </class>
7072         <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">
7073                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7074                         <field name="field" reporter:datatype="link"/>
7075                         <field name="id" reporter:datatype="id" />
7076                         <field name="source" reporter:datatype="link"/>
7077                         <field name="value" reporter:datatype="text"/>
7078                 </fields>
7079                 <links>
7080                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7081                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7082                 </links>
7083         </class>
7084         <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">
7085                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7086                         <field name="field" reporter:datatype="link"/>
7087                         <field name="id" reporter:datatype="id" />
7088                         <field name="source" reporter:datatype="link"/>
7089                         <field name="value" reporter:datatype="text"/>
7090                 </fields>
7091                 <links>
7092                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7093                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7094                 </links>
7095         </class>
7096         <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">
7097                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7098                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7099                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7100                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7101                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7102                 </fields>
7103                 <links>
7104                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7105                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7106                 </links>
7107         </class>
7108         <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">
7109                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7110                         <field name="depth" reporter:datatype="int" />
7111                         <field name="grantable" reporter:datatype="bool"/>
7112                         <field name="grp" reporter:datatype="link"/>
7113                         <field name="id" reporter:datatype="id" />
7114                         <field name="perm" reporter:datatype="link"/>
7115                 </fields>
7116                 <links>
7117                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7118                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7119                 </links>
7120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7121             <actions>
7122                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7123                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7124                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7125                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7126             </actions>
7127         </permacrud>
7128         </class>
7129         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7130                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7131                         <field name="items" oils_persist:virtual="true" />
7132                         <field name="btype" reporter:datatype="text"/>
7133                         <field name="id" reporter:datatype="id" />
7134                         <field name="name" reporter:datatype="text"/>
7135                         <field name="description" reporter:datatype="text"/>
7136                         <field name="owner" reporter:datatype="link"/>
7137                         <field name="pub" reporter:datatype="bool"/>
7138                         <field name="create_time" reporter:datatype="timestamp" />
7139                 </fields>
7140                 <links>
7141                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7142                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7143                 </links>
7144         </class>
7145         <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">
7146                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7147                         <field name="id" reporter:datatype="id" />
7148                         <field name="bucket" reporter:datatype="link"/>
7149                         <field name="note" reporter:datatype="text" />
7150                 </fields>
7151                 <links>
7152                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7153                 </links>
7154         </class>
7155         <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">
7156                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7157                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7158                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7159                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7160                 </fields>
7161                 <links>
7162                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7163                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7164                 </links>
7165         </class>
7166         <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">
7167                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7168                         <field name="depth" reporter:datatype="int"/>
7169                         <field name="grantable" reporter:datatype="bool"/>
7170                         <field name="id" reporter:datatype="id" />
7171                         <field name="perm" reporter:datatype="link"/>
7172                         <field name="usr" reporter:datatype="link"/>
7173                 </fields>
7174                 <links>
7175                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7176                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7177                 </links>
7178         </class>
7179         <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">
7180                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7181                         <field name="object_id" reporter:datatype="text"/>
7182                         <field name="grantable" reporter:datatype="bool"/>
7183                         <field name="id" reporter:datatype="id" />
7184                         <field name="perm" reporter:datatype="link"/>
7185                         <field name="usr" reporter:datatype="link"/>
7186                         <field name="object_type" reporter:datatype="text"/>
7187                 </fields>
7188                 <links>
7189                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7190                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7191                 </links>
7192         </class>
7193         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7194                 <fields oils_persist:primary="id" oils_persist:sequence="">
7195                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7196                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7197                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7198                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7199                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7200                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7201                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7202                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7204                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7210                 </fields>
7211                 <links>
7212                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7213                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7214                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7215                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7216                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7217                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7218                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7219                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7220                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7221                 </links>
7222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7223             <actions>
7224                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7225                     <context link="xact" jump="usr" field="home_ou"/>
7226                 </retrieve>
7227                         </actions>
7228                 </permacrud>
7229         </class>
7230         <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">
7231                 <fields oils_persist:primary="id" oils_persist:sequence="">
7232                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7233                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7234                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7235                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7236                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7237                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7238                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7239                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7240                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7241                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7242                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7243                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7244                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7245                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7246                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7247                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7248                 </fields>
7249                 <links>
7250                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7251                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7252                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7253                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7254                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7255                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7256                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7257                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7258                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7259                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7260                 </links>
7261         </class>
7262         <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">
7263                 <fields oils_persist:primary="id" oils_persist:sequence="">
7264                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7265                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7266                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7267                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7268                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7269                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7270                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7271                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7272                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7273                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7274                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7275                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7276                 </fields>
7277                 <links>
7278                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7279                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7280                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7281                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7282                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7283                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7284                 </links>
7285         </class>
7286         <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">
7287                 <fields oils_persist:primary="id" oils_persist:sequence="">
7288                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7289                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7290                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7291                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7292                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7293                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7294                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7295                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7296                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7297                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7298                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7299                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7300                 </fields>
7301                 <links>
7302                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7303                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7304                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7305                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7306                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7307                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7308                 </links>
7309         </class>
7310         <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">
7311                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7312                         <field name="bucket" reporter:datatype="link"/>
7313                         <field name="id" reporter:datatype="id" />
7314                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7315                         <field name="create_time" reporter:datatype="timestamp" />
7316                         <field name="pos" reporter:datatype="int" />
7317                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7318                 </fields>
7319                 <links>
7320                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7321                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7322             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7323                 </links>
7324         </class>
7325         <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">
7326                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7327                         <field name="id" reporter:datatype="id" />
7328                         <field name="item" reporter:datatype="link"/>
7329                         <field name="note" reporter:datatype="text" />
7330                 </fields>
7331                 <links>
7332                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7333                 </links>
7334         </class>
7335         <class id="asce" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
7336                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7337                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7338                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7339                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7340                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7341                 </fields>
7342                 <links>
7343                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7344                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7345                 </links>
7346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7347                         <actions>
7348                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7349                         </actions>
7350                 </permacrud>
7351         </class>
7352     <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">
7353         <fields oils_persist:primary="field">
7354             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7355             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7356             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7357         </fields>
7358         <links/>
7359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7360             <actions>
7361                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7362                 <retrieve />
7363                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7364                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7365             </actions>
7366         </permacrud>
7367     </class>
7368         <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">
7369                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7370                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7371                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7372                 </fields>
7373                 <links/>
7374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7375             <actions>
7376                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7377                 <retrieve/>
7378                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7379                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7380             </actions>
7381         </permacrud>
7382         </class>
7383
7384
7385         <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">
7386                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7387                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7388                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7389                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7390                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7391                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7392                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7393                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7394                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7395                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7396                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7397                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7398                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7399                 </fields>
7400                 <links>
7401                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7402                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7403                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7404                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7405                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7406                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7407                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7408                 </links>
7409         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7410             <actions>
7411                 <create permission="TRANSIT_COPY">
7412                     <context link="target_copy" field="owner"/>
7413                 </create>
7414                 <retrieve/>
7415                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7416                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7417             </actions>
7418         </permacrud>
7419         </class>
7420         <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">
7421                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7422                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7423                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7424                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7425                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7426                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7427                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7428                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7429                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7430                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7431                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7432                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7433                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7434                 </fields>
7435                 <links>
7436                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7437                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7438                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7439                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7440                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7441                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7442                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7443                 </links>
7444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7445             <actions>
7446                 <create permission="TRANSIT_COPY" context_field="owner">
7447                     <context link="target_copy" field="circ_lib"/>
7448                 </create>
7449                 <retrieve/>
7450                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7451                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7452             </actions>
7453         </permacrud>
7454         </class>
7455         <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
7456                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7457                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7458                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7459                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7460                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7461                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7462                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7463                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7464                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7465                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7466                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7467                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7468                 </fields>
7469                 <links>
7470                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7471                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7472                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7473                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7474                 </links>
7475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7476             <actions>
7477                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7478                     <context link="xact" jump="usr" field="home_ou"/>
7479                 </retrieve>
7480                         </actions>
7481                 </permacrud>
7482         </class>
7483         <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">
7484                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7485                         <field name="grp" />
7486                         <field name="id" reporter:datatype="id" />
7487                         <field name="usr" />
7488                 </fields>
7489                 <links>
7490                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7491                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7492                 </links>
7493         </class>
7494         <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">
7495                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7496                         <field name="id" reporter:datatype="id" />
7497                         <field name="fq_field" reporter:datatype="text"/>
7498                         <field name="identity_value" reporter:datatype="text"/>
7499                         <field name="translation" reporter:datatype="text"/>
7500                         <field name="string" reporter:datatype="text"/>
7501                 </fields>
7502                 <links>
7503                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7504                 </links>
7505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7506             <actions>
7507                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7508                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7509                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7510                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7511             </actions>
7512         </permacrud>
7513         </class>
7514         <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">
7515                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7516                         <field name="id" reporter:datatype="id" />
7517                         <field name="fm_class" reporter:datatype="text"/>
7518                         <field name="field" reporter:datatype="text"/>
7519                         <field name="owner" reporter:datatype="org_unit"/>
7520                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7521                 </fields>
7522                 <links>
7523                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7524                 </links>
7525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7526             <actions>
7527                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7528                 <retrieve/>
7529                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7530                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7531             </actions>
7532         </permacrud>
7533         </class>
7534         <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">
7535                 <fields oils_persist:primary="code">
7536                         <field name="code" reporter:datatype="id" />
7537                         <field name="marc_code" reporter:datatype="text"/>
7538                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7539                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7540                         <field name="rtl" reporter:datatype="bool"/>
7541                 </fields>
7542                 <links/>
7543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7544             <actions>
7545                 <create permission="CREATE_LOCALE" global_required="true"/>
7546                 <retrieve/>
7547                 <update permission="UPDATE_LOCALE" global_required="true"/>
7548                 <delete permission="DELETE_LOCALE" global_required="true"/>
7549             </actions>
7550         </permacrud>
7551         </class>
7552         <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">
7553                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7554                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7555                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7556                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7557             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7558                 </fields>
7559                 <links>
7560                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7561                 </links>
7562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7563             <actions>
7564                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7565                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7566                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7567                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7568             </actions>
7569         </permacrud>
7570         </class>
7571
7572         <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">
7573                 <fields oils_persist:primary="id">
7574                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7575                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7576                 </fields>
7577                 <links/>
7578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7579             <actions>
7580                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7581                 <retrieve/>
7582                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7583                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7584             </actions>
7585         </permacrud>
7586         </class>
7587
7588         <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">
7589                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7590                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7591                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7592                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7593                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7594                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7595                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7596                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7597                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7598                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7599                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7600                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7601                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7602                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7603                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7604                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7605                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7606                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7607                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7608                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7609                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7610                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7611                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7612                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7613                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7614                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7615                 </fields>
7616                 <links>
7617                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7618                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7619                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7620                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7621                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7622                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7623                 </links>
7624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7625             <actions>
7626                 <create permission="user_request.create">
7627                     <context link="usr" field="home_ou"/>
7628                                 </create>
7629                 <retrieve permission="user_request.view">
7630                     <context link="usr" field="home_ou"/>
7631                                 </retrieve>
7632                 <update permission="user_request.update">
7633                     <context link="usr" field="home_ou"/>
7634                                 </update>
7635                 <delete permission="user_request.delete">
7636                     <context link="usr" field="home_ou"/>
7637                                 </delete>
7638             </actions>
7639         </permacrud>
7640         </class>
7641
7642         <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">
7643                 <fields oils_persist:primary="code">
7644                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7645                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7646                 </fields>
7647                 <links/>
7648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7649             <actions>
7650                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7651                 <retrieve/>
7652                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7653                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7654             </actions>
7655         </permacrud>
7656         </class>
7657
7658         <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">
7659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7660                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7661                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7662                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7663                         <field reporter:label="Ratio" name="ratio" />
7664                 </fields>
7665                 <links>
7666                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7667                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7668                 </links>
7669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7670                         <actions>
7671                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7672                                 <retrieve/>
7673                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7674                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7675                         </actions>
7676                 </permacrud>
7677         </class>
7678
7679         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7680                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7681                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7682                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7683                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7684                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7685                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7686                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7687                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7688                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7689                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7690                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7691                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7692                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7693                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7694                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7695                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7696                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7697                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7698                 </fields>
7699                 <links>
7700                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7701                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7702             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7703             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7704             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7705                 </links>
7706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7707             <actions>
7708                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7709                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7710                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7711                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7712             </actions>
7713         </permacrud>
7714         </class>
7715
7716         <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">
7717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7718                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7719                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7720                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7721                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7722                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7723                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7724                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7725                 </fields>
7726                 <links>
7727                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7728                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7729                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7730                 </links>
7731         </class>
7732
7733         <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">
7734                 <fields oils_persist:primary="code">
7735                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7736                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7737                 </fields>
7738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7739             <actions>
7740                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7741                 <retrieve/>
7742                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7743                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7744             </actions>
7745                 </permacrud>
7746         </class>
7747
7748         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7749                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7750                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7751                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7752                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7753                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7754                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7755                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7756                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7757                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7758                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7759                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7760                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7761                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7762                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7763                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7764                 </fields>
7765                 <links>
7766                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7767                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7768                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7769                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7770                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7771                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7772                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7773                 </links>
7774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7775             <actions>
7776                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7777                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7778                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7779                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7780             </actions>
7781         </permacrud>
7782         </class>
7783
7784         <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">
7785                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7786                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7787                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7788                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7789                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7790                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7791                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7792                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7793                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7794                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7795                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7796                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7797                 </fields>
7798                 <links>
7799                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7800                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7801                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7802                 </links>
7803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7804             <actions>
7805                 <create   permission="ADMIN_INVOICE">
7806                                         <context link="invoice" field="receiver"/>
7807                                 </create>
7808                 <retrieve permission="ADMIN_INVOICE">
7809                                         <context link="invoice" field="receiver"/>
7810                                 </retrieve>
7811                 <update   permission="ADMIN_INVOICE">
7812                                         <context link="invoice" field="receiver"/>
7813                                 </update>
7814                                 <delete   permission="ADMIN_INVOICE">
7815                                         <context link="invoice" field="receiver"/>
7816                                 </delete>
7817             </actions>
7818         </permacrud>
7819         </class>
7820
7821         <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">
7822                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7823                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7824                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7825                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7826                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7827                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7828                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7829                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7830                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7831                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7832                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7833                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7834                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7835                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7836                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7837                 </fields>
7838                 <links>
7839                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7840                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7841                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7842                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7843                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7844                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7845                 </links>
7846         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7847             <actions>
7848                 <create   permission="ADMIN_INVOICE">
7849                                         <context link="invoice" field="receiver"/>
7850                                 </create>
7851                 <retrieve permission="ADMIN_INVOICE">
7852                                         <context link="invoice" field="receiver"/>
7853                                 </retrieve>
7854                 <update   permission="ADMIN_INVOICE">
7855                                         <context link="invoice" field="receiver"/>
7856                                 </update>
7857                                 <delete   permission="ADMIN_INVOICE">
7858                                         <context link="invoice" field="receiver"/>
7859                                 </delete>
7860             </actions>
7861         </permacrud>
7862         </class>
7863
7864         <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">
7865                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7866                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7867                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7868                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7869                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7871                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7872                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7873                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7874                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7875                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7876                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7877                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7878                 </fields>
7879                 <links>
7880                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7881                 </links>
7882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7883             <actions>
7884                 <create permission="ADMIN_PROVIDER">
7885                     <context link="provider" field="owner"/>
7886                 </create>
7887                 <retrieve permission="ADMIN_PROVIDER">
7888                     <context link="provider" field="owner"/>
7889                 </retrieve>
7890                 <update permission="ADMIN_PROVIDER">
7891                     <context link="provider" field="owner"/>
7892                 </update>
7893                 <delete permission="ADMIN_PROVIDER">
7894                     <context link="provider" field="owner"/>
7895                 </delete>
7896             </actions>
7897         </permacrud>
7898         </class>
7899
7900         <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">
7901                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7902                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7903                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7904                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7905                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7906                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7907                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7908         </fields>
7909                 <links>
7910                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7911                 </links>
7912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7913             <actions>
7914                 <create permission="ADMIN_PROVIDER">
7915                     <context link="provider" field="owner"/>
7916                 </create>
7917                 <retrieve permission="ADMIN_PROVIDER">
7918                     <context link="provider" field="owner"/>
7919                 </retrieve>
7920                 <update permission="ADMIN_PROVIDER">
7921                     <context link="provider" field="owner"/>
7922                 </update>
7923                 <delete permission="ADMIN_PROVIDER">
7924                     <context link="provider" field="owner"/>
7925                 </delete>
7926             </actions>
7927         </permacrud>
7928     </class>
7929         <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">
7930                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7931                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7932                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7933                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7934                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7935                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7936                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7937                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7938                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7939                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7940                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7941                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7942                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7943                 </fields>
7944                 <links>
7945                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7946                 </links>
7947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7948             <actions>
7949                 <create permission="ADMIN_PROVIDER">
7950                     <context link="contact" jump='provider' field="owner"/>
7951                 </create>
7952                 <retrieve permission="ADMIN_PROVIDER">
7953                     <context link="contact" jump='provider' field="owner"/>
7954                 </retrieve>
7955                 <update permission="ADMIN_PROVIDER">
7956                     <context link="contact" jump='provider' field="owner"/>
7957                 </update>
7958                 <delete permission="ADMIN_PROVIDER">
7959                     <context link="contact" jump='provider' field="owner"/>
7960                 </delete>
7961             </actions>
7962         </permacrud>
7963         </class>
7964
7965         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7966                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7967                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7968                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7969                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7970                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7971                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7972                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7973                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7974                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7975                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7976                 </fields>
7977                 <links>
7978                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7979                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7980                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7981                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7982                 </links>
7983         </class>
7984
7985         <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">
7986                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7987                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7988                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7989                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7990                 </fields>
7991                 <links>
7992             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7993                 </links>
7994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7995                         <actions>
7996                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7997                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7998                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7999                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8000                         </actions>
8001                 </permacrud>
8002         </class>
8003
8004         <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">
8005                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8006                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8007                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8008                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8009                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8010                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8011                 </fields>
8012                 <links>
8013                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8014                 </links>
8015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8016                         <actions>
8017                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8018                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8019                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8020                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8021                         </actions>
8022                 </permacrud>
8023         </class>
8024
8025         <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">
8026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8027                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8028                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8029                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8030                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8031                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8032                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8033                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8034                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8035                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8036                 </fields>
8037                 <links>
8038                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8039                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8040             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8041             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8042                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8043                 </links>
8044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8045             <actions>
8046                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8047                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8048                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8049                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8050             </actions>
8051         </permacrud>
8052         </class>
8053
8054         <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">
8055                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8056                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8057                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8058                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8059                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8060                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8061                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8062                 </fields>
8063                 <links>
8064                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8065                 </links>
8066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8067                         <actions>
8068                                 <create permission="ADMIN_FUNDING_SOURCE">
8069                     <context link="funding_source" field="owner"/>
8070                 </create>
8071                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8072                     <context link="funding_source" field="owner"/>
8073                 </retrieve>
8074                                 <update permission="ADMIN_FUNDING_SOURCE">
8075                     <context link="funding_source" field="owner"/>
8076                 </update>
8077                                 <delete permission="ADMIN_FUNDING_SOURCE">
8078                     <context link="funding_source" field="owner"/>
8079                 </delete>
8080                         </actions>
8081                 </permacrud>
8082         </class>
8083
8084         <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">
8085                 <fields oils_persist:primary="id">
8086                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8087                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8088                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8089                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8090                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8091                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8092                 </fields>
8093                 <links>
8094                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8095                 </links>
8096         </class>
8097
8098         <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">
8099                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8100                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8101                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8102                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8103                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8104                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8105                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8106                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8107                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8108                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8109                 </fields>
8110                 <links>
8111                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8112                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8113                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8114                 </links>
8115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8116                         <actions>
8117                                 <create permission="ADMIN_ACQ_FUND">
8118                     <context link="fund" field="org"/>
8119                 </create>
8120                                 <retrieve permission="ADMIN_ACQ_FUND">
8121                     <context link="fund" field="org"/>
8122                 </retrieve>
8123                                 <update permission="ADMIN_ACQ_FUND">
8124                     <context link="fund" field="org"/>
8125                 </update>
8126                                 <delete permission="ADMIN_ACQ_FUND">
8127                     <context link="fund" field="org"/>
8128                 </delete>
8129                         </actions>
8130                 </permacrud>
8131         </class>
8132
8133         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8135                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8136                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8137                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8138                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8139                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8140                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8141                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8142                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8143                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8144                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8145                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8146                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8147                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8148                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8149                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8150                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8151                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8152                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8153                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8154                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8155                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8156                 </fields>
8157                 <links>
8158                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8159                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8160             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8161             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8162             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8163             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8164             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8165             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8166             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8167             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8168             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8169                 </links>
8170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8171             <actions>
8172                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8173                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8174                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8175                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8176             </actions>
8177         </permacrud>
8178         </class>
8179
8180         <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">
8181                 <fields oils_persist:primary="fund">
8182                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8183                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8184                 </fields>
8185                 <links>
8186                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8187                 </links>
8188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8189             <actions>
8190                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8191                                         <context link="fund" field="org" />
8192                 </retrieve>
8193             </actions>
8194         </permacrud>
8195         </class>
8196
8197         <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">
8198                 <fields oils_persist:primary="fund">
8199                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8200                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8201                 </fields>
8202                 <links>
8203                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8204                 </links>
8205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8206             <actions>
8207                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8208                                         <context link="fund" field="org" />
8209                 </retrieve>
8210             </actions>
8211         </permacrud>
8212         </class>
8213
8214         <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">
8215                 <fields oils_persist:primary="fund">
8216                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8217                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8218                 </fields>
8219                 <links>
8220                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8221                 </links>
8222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8223             <actions>
8224                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8225                                         <context link="fund" field="org" />
8226                 </retrieve>
8227             </actions>
8228         </permacrud>
8229         </class>
8230
8231         <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">
8232                 <fields oils_persist:primary="fund">
8233                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8234                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8235                 </fields>
8236                 <links>
8237                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8238                 </links>
8239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8240             <actions>
8241                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8242                                         <context link="fund" field="org" />
8243                 </retrieve>
8244             </actions>
8245         </permacrud>
8246         </class>
8247
8248         <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">
8249                 <fields oils_persist:primary="fund">
8250                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8251                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8252                 </fields>
8253                 <links>
8254                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8255                 </links>
8256         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8257             <actions>
8258                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8259                                         <context link="fund" field="org" />
8260                 </retrieve>
8261             </actions>
8262         </permacrud>
8263         </class>
8264
8265    <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">
8266         <fields oils_persist:primary="fund">
8267             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8268             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8269         </fields>
8270         <links>
8271             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8272         </links>
8273     </class>
8274
8275    <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">
8276         <fields oils_persist:primary="fund">
8277             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8278             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8279         </fields>
8280         <links>
8281             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8282         </links>
8283     </class>
8284
8285    <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">
8286         <fields oils_persist:primary="fund">
8287             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8288             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8289         </fields>
8290         <links>
8291             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8292         </links>
8293     </class>
8294
8295    <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">
8296         <fields oils_persist:primary="fund">
8297             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8298             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8299         </fields>
8300         <links>
8301             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8302         </links>
8303     </class>
8304
8305    <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">
8306         <fields oils_persist:primary="fund">
8307             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8308             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8309         </fields>
8310         <links>
8311             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8312         </links>
8313     </class>
8314
8315         <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">
8316                 <fields oils_persist:primary="funding_source">
8317                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8318                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8319                 </fields>
8320                 <links>
8321                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8322                 </links>
8323         </class>
8324
8325         <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">
8326                 <fields oils_persist:primary="funding_source">
8327                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8328                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8329                 </fields>
8330                 <links>
8331                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8332                 </links>
8333         </class>
8334
8335         <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">
8336                 <fields oils_persist:primary="funding_source">
8337                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8338                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8339                 </fields>
8340                 <links>
8341                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8342                 </links>
8343         </class>
8344
8345         <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">
8346                 <fields oils_persist:primary="fund">
8347                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8348                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8349                 </fields>
8350                 <links>
8351                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8352                 </links>
8353         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8354             <actions>
8355                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8356                                         <context link="fund" field="org" />
8357                 </retrieve>
8358             </actions>
8359         </permacrud>
8360     </class>
8361     <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">
8362         <oils_persist:source_definition><![CDATA[
8363             SELECT
8364                 acqf.*,
8365                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8366                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8367                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8368                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8369             FROM
8370                 acq.fund acqf
8371                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8372                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8373                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8374                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8375         ]]></oils_persist:source_definition>
8376         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8377             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8378             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8379             <field reporter:label="Name" name="name" reporter:datatype="text" />
8380             <field reporter:label="Year" name="year" reporter:datatype="int" />
8381             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8382             <field reporter:label="Code" name="code" reporter:datatype="text" />
8383             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8384             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8385             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8386             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8387             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8388
8389             <!-- non fund-native fields -->
8390             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8391             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8392             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8393             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8394         </fields>
8395         <links>
8396             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8397             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8398             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8399         </links>
8400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8401             <actions>
8402                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8403             </actions>
8404         </permacrud>
8405         </class>
8406         <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">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8408                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8409                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8410                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8411                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8412                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8413                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8414                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8415                 </fields>
8416                 <links>
8417                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8418                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8419                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8420                 </links>
8421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8422                         <actions>
8423                                 <create permission="ADMIN_ACQ_FUND">
8424                     <context link="fund" field="org"/>
8425                 </create>
8426                                 <retrieve permission="ADMIN_ACQ_FUND">
8427                     <context link="fund" field="org"/>
8428                 </retrieve>
8429                                 <update permission="ADMIN_ACQ_FUND">
8430                     <context link="fund" field="org"/>
8431                 </update>
8432                                 <delete permission="ADMIN_ACQ_FUND">
8433                     <context link="fund" field="org"/>
8434                 </delete>
8435                         </actions>
8436                 </permacrud>
8437         </class>
8438
8439     <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">
8440         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8441             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8442             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8443             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8444             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8445             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8446             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8447             <field reporter:label="Note" name="note" reporter:datatype="text" />
8448             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8449         </fields>
8450         <links>
8451             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8452             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8453             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8454         </links>
8455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8456                         <actions>
8457                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8458                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8459                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8460                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8461                         </actions>
8462                 </permacrud>
8463     </class>
8464
8465         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8466                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8467                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8468                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8469                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8470                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8471                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8472                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8473                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8474                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8475                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8476                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8477                 </fields>
8478                 <links>
8479                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8480                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8481                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8482                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8483                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8484                 </links>
8485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8486                         <actions>
8487                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8488                         </actions>
8489                 </permacrud>
8490         </class>
8491
8492         <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">
8493                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8494                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8495                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8496                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8497                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8498                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8499                 </fields>
8500                 <links>
8501                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8502                 </links>
8503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8504                         <actions>
8505                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8506                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8507                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8508                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8509                         </actions>
8510                 </permacrud>
8511         </class>
8512
8513         <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">
8514                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8515                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8516                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8517                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8518                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8519                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8520                         <field reporter:label="State" name="state" reporter:datatype="text" />
8521                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8522                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8523                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8524                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8525                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8526                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8527                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8528                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8529                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8530                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8531                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8532                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8533                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8534                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8535                 </fields>
8536                 <links>
8537                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8538                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8539                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8540                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8541                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8542                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8543                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8544                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8545                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8546                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8547                 </links>
8548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8549                         <actions>
8550                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8551                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8552                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8553                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8554                         </actions>
8555                 </permacrud>
8556         </class>
8557
8558         <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">
8559                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8560                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8561                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8562                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8563                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8564                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8565                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8566                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8567                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8568                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8569                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8570                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8571                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8572                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8573                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8574                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8575                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8576                 </fields>
8577                 <links>
8578                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8579                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8580                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8581                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8582                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8583                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8584                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8585                 </links>
8586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8587             <actions>
8588                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8589             </actions>
8590                 </permacrud>
8591         </class>
8592
8593         <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">
8594                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8595                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8596                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8597                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8598                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8599                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8600                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8601                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8602                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8603                 </fields>
8604                 <links>
8605                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8606                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8607                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8608                 </links>
8609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8610             <actions>
8611                 <create permission="CREATE_PURCHASE_ORDER">
8612                     <context link="purchase_order" field="ordering_agency"/>
8613                 </create>
8614                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8615                     <context link="purchase_order" field="ordering_agency"/>
8616                 </retrieve>
8617                 <update permission="CREATE_PURCHASE_ORDER">
8618                     <context link="purchase_order" field="ordering_agency"/>
8619                 </update>
8620                 <delete permission="CREATE_PURCHASE_ORDER">
8621                     <context link="purchase_order" field="ordering_agency"/>
8622                 </delete>
8623             </actions>
8624                 </permacrud>
8625         </class>
8626
8627         <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">
8628                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8629                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8630                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8631                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8632                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8633                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8634                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8635                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8636                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8637                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8638                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8639                 </fields>
8640                 <links>
8641                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8642                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8643                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8644                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8645                 </links>
8646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8647             <actions>
8648                 <create permission="CREATE_PURCHASE_ORDER">
8649                     <context link="purchase_order" field="ordering_agency"/>
8650                 </create>
8651                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8652                     <context link="purchase_order" field="ordering_agency"/>
8653                 </retrieve>
8654                 <update permission="CREATE_PURCHASE_ORDER">
8655                     <context link="purchase_order" field="ordering_agency"/>
8656                 </update>
8657                 <delete permission="CREATE_PURCHASE_ORDER">
8658                     <context link="purchase_order" field="ordering_agency"/>
8659                 </delete>
8660             </actions>
8661                 </permacrud>
8662         </class>
8663
8664         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8665                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8666                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8667                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8668                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8669                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8670                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8671                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8672                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8673                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8674                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8675                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8676                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8677                         <field reporter:label="State" name="state" reporter:datatype="text" />
8678                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8679                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8680                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8681                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8682                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8683                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8684                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8685                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8686                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8687                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8688                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8689                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8690                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8691                 </fields>
8692                 <links>
8693                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8694                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8695                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8696                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8697                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8698                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8699                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8700                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8701                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8702                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8703                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8704                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8705                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8706                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8707                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8708                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8709                 </links>
8710                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8711                         <actions>
8712                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8713                                         <context link="purchase_order" field="ordering_agency"/>
8714                                         <context link="picklist" field="org_unit"/>
8715                                 </retrieve>
8716                         </actions>
8717                 </permacrud>
8718         </class>
8719
8720         <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">
8721                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8722                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8723                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8724                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8725                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8726                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8727                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8728                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8729                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8730                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8731                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8732                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8733                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8734                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8735                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8736                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8737                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8738                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8739                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8740                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8741                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8742                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8743                 </fields>
8744                 <links>
8745                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8746                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8747                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8748                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8749                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8750                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8751                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8752                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8753                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8754                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8755                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8756                 </links>
8757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8758                         <actions>
8759                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8760                                         <context link="purchase_order" field="ordering_agency"/>
8761                                         <context link="picklist" field="org_unit"/>
8762                                 </retrieve>
8763                         </actions>
8764                 </permacrud>
8765         </class>
8766
8767         <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">
8768                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8769                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8770                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8771                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8772                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8773                 </fields>
8774                 <links>
8775                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8776                 </links>
8777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8778                         <actions>
8779                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8780                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8781                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8782                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8783                         </actions>
8784                 </permacrud>
8785         </class>
8786
8787         <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">
8788                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8789                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8790                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8791                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8792                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8793                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8794                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8795                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8796                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8797                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8798                 </fields>
8799                 <links>
8800                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8801                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8802                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8803                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8804                 </links>
8805         </class>
8806
8807         <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">
8808                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8809                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8810                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8811                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8812                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8813                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8814                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8815                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8816                 </fields>
8817                 <links>
8818                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8819                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8820                 </links>
8821         </class>
8822
8823         <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">
8824                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8825                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8826                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8827                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8828                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8829                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8830                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8831                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8832                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8833                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8834                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8835                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8836                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8837                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8838                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8839                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8840                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8841                 </fields>
8842                 <links>
8843                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8844                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8845                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8846                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8847                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8848                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8849                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8850                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8851                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8852                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8853                 </links>
8854         </class>
8855
8856         <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">
8857                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8858                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8859                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8860                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8861                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8862                 </fields>
8863                 <links/>
8864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8865                         <actions>
8866                                 <retrieve />
8867                         </actions>
8868                 </permacrud>
8869         </class>
8870
8871         <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">
8872                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8873                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8874                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8875                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8876                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8877                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8878             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8879                 </fields>
8880                 <links/>
8881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8882             <actions>
8883                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8884                 <retrieve />
8885                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8886                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8887             </actions>
8888         </permacrud>
8889         </class>
8890
8891         <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">
8892                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8893                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8894                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8895                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8896                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8897                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8898                 </fields>
8899                 <links/>
8900         </class>
8901         <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">
8902                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8903                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8904                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8905                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8906                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8907                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8908                 </fields>
8909                 <links>
8910                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8911                 </links>
8912         </class>
8913
8914         <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">
8915             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8916                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8917                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8918                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8919                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8920                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8921                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8922         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8923
8924             </fields>
8925             <links>
8926                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8927             </links>
8928             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8929                 <actions>
8930                     <create permission="ADMIN_PROVIDER">
8931                         <context link="provider" field="owner"/>
8932                     </create>
8933                     <retrieve permission="ADMIN_PROVIDER">
8934                         <context link="provider" field="owner"/>
8935                     </retrieve>
8936                     <update permission="ADMIN_PROVIDER">
8937                         <context link="provider" field="owner"/>
8938                     </update>
8939                     <delete permission="ADMIN_PROVIDER">
8940                         <context link="provider" field="owner"/>
8941                     </delete>
8942                 </actions>
8943             </permacrud>
8944         </class>
8945         
8946         <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">
8947             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8948                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8949                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8950                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8951                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8952             </fields>
8953             <links>
8954                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8955             </links>
8956             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8957                 <actions>
8958                     <create permission="ADMIN_PROVIDER">
8959                         <context link="provider" field="owner"/>
8960                     </create>
8961                     <retrieve permission="ADMIN_PROVIDER">
8962                         <context link="provider" field="owner"/>
8963                     </retrieve>
8964                     <update permission="ADMIN_PROVIDER">
8965                         <context link="provider" field="owner"/>
8966                     </update>
8967                     <delete permission="ADMIN_PROVIDER">
8968                         <context link="provider" field="owner"/>
8969                     </delete>
8970                 </actions>
8971             </permacrud>
8972         </class>
8973         
8974         <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">
8975             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8976                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8977                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8978                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8979                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8980                 </fields>
8981                 <links/>
8982         </class>
8983
8984         <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">
8985                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8986                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8987                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8988                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8989                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8990                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8991                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8992                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8993                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8994                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8995                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8996                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8997                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8998                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8999                 </fields>
9000                 <links>
9001                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9002                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9003                 </links>
9004         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9005             <actions>
9006                 <create permission="ADMIN_PROVIDER">
9007                     <context link="provider" field="owner"/>
9008                 </create>
9009                 <retrieve permission="ADMIN_PROVIDER">
9010                     <context link="provider" field="owner"/>
9011                 </retrieve>
9012                 <update permission="ADMIN_PROVIDER">
9013                     <context link="provider" field="owner"/>
9014                 </update>
9015                 <delete permission="ADMIN_PROVIDER">
9016                     <context link="provider" field="owner"/>
9017                 </delete>
9018             </actions>
9019         </permacrud>
9020         </class>
9021
9022         <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">
9023                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9024                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9025                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9026                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9027                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9028                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9029                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9030                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9031                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9032                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9033                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9034                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9035                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9036                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9037                 </fields>
9038                 <links>
9039                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9040                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9041                 </links>
9042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9043             <actions>
9044                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9045                     <context link="account" jump="provider" field="owner"/>
9046                 </retrieve>
9047                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9048                     <context link="account" jump="provider" field="owner"/>
9049                 </update>
9050                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9051                     <context link="account" jump="provider" field="owner"/>
9052                 </delete>
9053             </actions>
9054         </permacrud>
9055         </class>
9056
9057
9058         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9059                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9060                         <field name="id" reporter:datatype="id" />
9061                         <field name="parent" reporter:datatype="link"/>
9062                         <field name="owner" reporter:datatype="link"/>
9063                         <field name="create_time" reporter:datatype="timestamp"/>
9064                         <field name="name" reporter:datatype="text"/>
9065                         <field name="shared" reporter:datatype="bool"/>
9066                         <field name="share_with" reporter:datatype="link"/>
9067                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9068                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9069                 </fields>
9070                 <links>
9071                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9072                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9073                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9074                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9075                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9076                 </links>
9077         </class>
9078         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9079                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9080                         <field name="id" reporter:datatype="id" />
9081                         <field name="parent" reporter:datatype="link"/>
9082                         <field name="owner" reporter:datatype="link"/>
9083                         <field name="create_time" reporter:datatype="timestamp"/>
9084                         <field name="name" reporter:datatype="text"/>
9085                         <field name="shared" reporter:datatype="bool"/>
9086                         <field name="share_with" reporter:datatype="link"/>
9087                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9088                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9089                 </fields>
9090                 <links>
9091                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9092                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9093                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9094                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9095                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9096                 </links>
9097         </class>
9098         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9099                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9100                         <field name="id" reporter:datatype="id" />
9101                         <field name="parent" reporter:datatype="link"/>
9102                         <field name="owner" reporter:datatype="link"/>
9103                         <field name="create_time" reporter:datatype="timestamp"/>
9104                         <field name="name" reporter:datatype="text"/>
9105                         <field name="shared" reporter:datatype="bool"/>
9106                         <field name="share_with" reporter:datatype="link"/>
9107                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9108                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9109                 </fields>
9110                 <links>
9111                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9112                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9113                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9114                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9115                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9116                 </links>
9117         </class>
9118         <class id="rt" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
9119                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9120                         <field name="id" reporter:datatype="id" />
9121                         <field name="owner" reporter:datatype="link"/>
9122                         <field name="create_time" reporter:datatype="timestamp"/>
9123                         <field name="name" reporter:datatype="text"/>
9124                         <field name="data" reporter:datatype="text"/>
9125                         <field name="folder" reporter:datatype="link"/>
9126                         <field name="description" reporter:datatype="text"/>
9127                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9128                 </fields>
9129                 <links>
9130                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9131                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9132                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9133                 </links>
9134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9135             <actions>
9136                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9137                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9138                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9139                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9140             </actions>
9141         </permacrud>
9142         </class>
9143         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9144                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9145                         <field name="id" reporter:datatype="id" />
9146                         <field name="owner" reporter:datatype="link"/>
9147                         <field name="create_time" reporter:datatype="timestamp"/>
9148                         <field name="template" reporter:datatype="link"/>
9149                         <field name="data" reporter:datatype="text"/>
9150                         <field name="folder" reporter:datatype="link"/>
9151                         <field name="recur" reporter:datatype="bool"/>
9152                         <field name="recurrence" reporter:datatype="interval"/>
9153                         <field name="name" reporter:datatype="text"/>
9154                         <field name="description" reporter:datatype="text"/>
9155                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9156                 </fields>
9157                 <links>
9158                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9159                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9160                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9161                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9162                 </links>
9163         </class>
9164         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9165                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9166                         <field name="id" reporter:datatype="id" />
9167                         <field name="runner" reporter:datatype="link"/>
9168                         <field name="start_time" reporter:datatype="timestamp"/>
9169                         <field name="complete_time" reporter:datatype="timestamp"/>
9170                         <field name="run_time" reporter:datatype="timestamp"/>
9171                         <field name="email" reporter:datatype="text"/>
9172                         <field name="excel_format" reporter:datatype="bool"/>
9173                         <field name="csv_format" reporter:datatype="bool"/>
9174                         <field name="html_format" reporter:datatype="bool"/>
9175                         <field name="error_code" reporter:datatype="int"/>
9176                         <field name="error_text" reporter:datatype="text"/>
9177                         <field name="report" reporter:datatype="link"/>
9178                         <field name="folder" reporter:datatype="link"/>
9179                         <field name="chart_pie" reporter:datatype="bool"/>
9180                         <field name="chart_bar" reporter:datatype="bool"/>
9181                         <field name="chart_line" reporter:datatype="bool"/>
9182                 </fields>
9183                 <links>
9184                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9185                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9186                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9187                 </links>
9188         </class>
9189         <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">
9190                 <fields oils_persist:primary="id">
9191                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9192                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9193                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9194                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9195                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9196                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9197                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9198                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9199                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9200                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9201                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9202                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9203                 </fields>
9204                 <links>
9205                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9206                 </links>
9207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9208                         <actions>
9209                                 <retrieve />
9210                         </actions>
9211                 </permacrud>
9212         </class>
9213         <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">
9214                 <fields oils_persist:primary="id">
9215                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9216                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9217                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9218                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9219                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9220                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9221                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9222                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9223                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9224                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9225                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9226                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9227                 </fields>
9228                 <links>
9229                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9230                 </links>
9231         </class>
9232         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9233                 <fields oils_persist:primary="id">
9234                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9235                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9236                         <field reporter:label="Fingerprint" name="fingerprint" />
9237                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9238                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9239                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9240                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9241                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9242                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9243                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9244                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9245                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9246                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9247                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9248                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9249                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9250                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9251                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9252                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9253                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9254                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9255                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9256                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9257                 </fields>
9258                 <links>
9259                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9260                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9261                 </links>
9262         </class>
9263         <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">
9264                 <fields oils_persist:primary="id">
9265                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9266                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9267                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9268                 </fields>
9269                 <links>
9270                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9271                 </links>
9272         </class>
9273         <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">
9274                 <fields oils_persist:primary="id">
9275                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9276                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9277                 </fields>
9278                 <links>
9279                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9280                 </links>
9281         </class>
9282         <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">
9283                 <fields oils_persist:primary="id">
9284                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9285                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9286                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9287                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9288                 </fields>
9289                 <links>
9290                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9291                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9292                 </links>
9293         </class>
9294         <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">
9295                 <fields oils_persist:primary="xact">
9296                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9297                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9298                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9299                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9300                 </fields>
9301                 <links>
9302                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9303                 </links>
9304         </class>
9305         <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">
9306                 <fields oils_persist:primary="xact">
9307                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9308                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9309                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9310                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9311                 </fields>
9312                 <links>
9313                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9314                 </links>
9315         </class>
9316         <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)">
9317                 <fields oils_persist:primary="id">
9318                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9319                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9320                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9321                 </fields>
9322                 <links>
9323                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9324                 </links>
9325         </class>
9326         <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">
9327                 <fields oils_persist:primary="id">
9328                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9329                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9330                 </fields>
9331                 <links>
9332                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9333                 </links>
9334         </class>
9335         <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">
9336                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9337                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9338                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9339                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9340                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9341                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9342                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9343                 </fields>
9344                 <links>
9345                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9346                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9347                 </links>
9348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9349                         <actions>
9350                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9351                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9352                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9353                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9354                         </actions>
9355                 </permacrud>
9356         </class>
9357         <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">
9358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9359                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9360                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9361                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9362                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9363                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9364                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9365                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9366                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9367                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9368                 </fields>
9369                 <links>
9370                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9371                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9372                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9373                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9374                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9375                 </links>
9376                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9377                         <actions>
9378                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9379                                         <context link="formula" field="owner"/>
9380                                 </create>
9381                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9382                                         <context link="formula" field="owner"/>
9383                                 </retrieve>
9384                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9385                                         <context link="formula" field="owner"/>
9386                                 </update>
9387                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9388                                         <context link="formula" field="owner"/>
9389                                 </delete>
9390                         </actions>
9391                 </permacrud>
9392         </class>
9393
9394         <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">
9395                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9396                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9397                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9398                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9399                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9400                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9401                 </fields>
9402                 <links>
9403                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9404                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9405                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9406                 </links>
9407                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9408                         <actions>
9409                                 <create permission="CREATE_PURCHASE_ORDER">
9410                                         <context link="formula" field="owner"/>
9411                 </create>
9412                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9413                                         <context link="formula" field="owner"/>
9414                 </retrieve>
9415                                 <update permission="CREATE_PURCHASE_ORDER">
9416                                         <context link="formula" field="owner"/>
9417                 </update>
9418                                 <delete permission="CREATE_PURCHASE_ORDER">
9419                                         <context link="formula" field="owner"/>
9420                 </delete>
9421                         </actions>
9422                 </permacrud>
9423         </class>
9424
9425         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9426                 <fields oils_persist:primary="id">
9427                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9428                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9429                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9430                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9431                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9432                 </fields>
9433                 <links>
9434                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9435                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9436                 </links>
9437         </class>
9438
9439         <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">
9440                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9441                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9442                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9443                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9444                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9445                 </fields>
9446                 <links>
9447                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9448                 </links>
9449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9450                         <actions>
9451                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9452                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9453                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9454                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9455                         </actions>
9456                 </permacrud>
9457         </class>
9458
9459         <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">
9460                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9461                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9462                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9463                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9464                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9465                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9466                 </fields>
9467                 <links>
9468                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9469                 </links>
9470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9471                         <actions>
9472                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9473                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9474                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9475                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9476                         </actions>
9477                 </permacrud>
9478         </class>
9479
9480         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9481                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9482                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9483                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9484                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9485                 </fields>
9486                 <links>
9487                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9488                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9489                 </links>
9490         </class>
9491
9492         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9493                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9494                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9495                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9496                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9497                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9498                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9499                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9500                 </fields>
9501                 <links>
9502                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9503                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9504                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9505                 </links>
9506         </class>
9507
9508         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9509                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9510                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9511                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9512                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9513                 </fields>
9514                 <links>
9515                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9516                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9517                 </links>
9518         </class>
9519
9520         <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">
9521                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9522                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9523                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9524                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9525                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9526                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9527                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9528                 </fields>
9529                 <links>
9530                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9531                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9532                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9533                 </links>
9534         </class>
9535
9536         <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">
9537                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9538                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9539                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9540                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9541                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9542                 </fields>
9543                 <links>
9544                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9545                 </links>
9546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9547             <actions>
9548                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9549                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9550                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9551                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9552             </actions>
9553                 </permacrud>
9554         </class>
9555
9556         <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">
9557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9558                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9559                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9560                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9561                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9562                 </fields>
9563                 <links>
9564                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9565                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9566                 </links>
9567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9568                         <actions>
9569                                 <create permission="ADMIN_CLAIM_POLICY">
9570                                         <context link="claim_policy" field="org_unit"/>
9571                 </create>
9572                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9573                                         <context link="claim_policy" field="org_unit"/>
9574                 </retrieve>
9575                                 <update permission="ADMIN_CLAIM_POLICY">
9576                                         <context link="claim_policy" field="org_unit"/>
9577                 </update>
9578                                 <delete permission="ADMIN_CLAIM_POLICY">
9579                                         <context link="claim_policy" field="org_unit"/>
9580                 </delete>
9581                         </actions>
9582                 </permacrud>
9583         </class>
9584
9585     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9586         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9587             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9588             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9589             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9590             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9591             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9592             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9593             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9594             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9595             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9596             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9597             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9598             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9599             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9600             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9601             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9602             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9603         </fields>
9604         <links>
9605             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9606         </links>
9607     </class>
9608
9609     <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">
9610         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9611             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9612             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9613             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9614             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9615             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9616         </fields>
9617     </class>
9618
9619     <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">
9620         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9621             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9622             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9623             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9624             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9625             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9626             <field reporter:label="City" name="city" reporter:datatype="text"/>
9627             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9628             <field reporter:label="State" name="state" reporter:datatype="text"/>
9629             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9630             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9631             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9632         </fields>
9633     </class>
9634
9635     <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">
9636         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9637             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9638             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9639             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9640             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9641             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9642             <field reporter:label="City" name="city" reporter:datatype="text"/>
9643             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9644             <field reporter:label="State" name="state" reporter:datatype="text"/>
9645             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9646             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9647             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9648         </fields>
9649     </class>
9650
9651     <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">
9652         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9653             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9654             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9655             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9656             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9657             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9658             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9659         </fields>
9660     </class>
9661
9662     <class id="stgs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::setting_stage" oils_persist:tablename="staging.setting_stage" reporter:label="User Setting Stage">
9663         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9664             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9665             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9666             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9667             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9668             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9669             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9670         </fields>
9671     </class>
9672
9673         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9674                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9675                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9676                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9677                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9678                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9679                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9680                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9681                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9682                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9683                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9684                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9685                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9686                 </fields>
9687                 <links>
9688                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9689                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9690                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9691                 </links>
9692         </class>
9693
9694         <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">
9695                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9696                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9697                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9698                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9699                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9700                 </fields>
9701                 <links>
9702                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9703                 </links>
9704         </class>
9705
9706     <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">
9707         <fields>
9708             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9709             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9710             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9711         </fields>
9712                 <links>
9713                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9714                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9715                 </links>
9716     </class>
9717
9718     <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">
9719         <fields>
9720             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9721             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9722         </fields>
9723                 <links>
9724                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9725                 </links>
9726     </class>
9727
9728     <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">
9729         <fields>
9730             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9731             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9732             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9733         </fields>
9734                 <links>
9735                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9736                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9737                 </links>
9738     </class>
9739
9740     <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">
9741         <fields>
9742             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9743             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9744         </fields>
9745                 <links>
9746                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9747                 </links>
9748     </class>
9749
9750     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9751                 <oils_persist:source_definition>
9752
9753             SELECT  DISTINCT l.*
9754               FROM  action.unfulfilled_hold_loops l
9755                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9756               WHERE l.count = m.max
9757
9758                 </oils_persist:source_definition>
9759         <fields>
9760             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9761             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9762             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9763         </fields>
9764                 <links>
9765                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9766                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9767                 </links>
9768     </class>
9769
9770         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9771                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9772                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9773                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9774                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9775                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9776                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9777                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9778                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9779                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9780                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9781                 </fields>
9782                 <links>
9783                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9784                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9785                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9786                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9787                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9788                 </links>
9789         </class>
9790
9791         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9792                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9793                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9794                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9795                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9796                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9797                 </fields>
9798                 <links>
9799                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9800                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9801                 </links>
9802         </class>
9803
9804         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9805                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9806                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9807                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9808                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9809                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9810                 </fields>
9811                 <links>
9812                 </links>
9813         </class>
9814
9815         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9816                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9817                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9818                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9819                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9820                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9821                 </fields>
9822                 <links>
9823                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9824                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9825                 </links>
9826         </class>
9827         
9828         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9829                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9830                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9831                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9832                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9833                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9834                 </fields>
9835                 <links>
9836                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9837                 </links>
9838         </class>
9839         
9840         <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">
9841                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9842                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9843                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9844                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9845                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9846                 </fields>
9847                 <links>
9848                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9849                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9850                 </links>
9851         </class>
9852
9853         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9854                 <fields oils_persist:primary="name">
9855                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9856                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9857                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9858                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9859                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9860                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9861                 </fields>
9862                 <links>
9863                 </links>
9864         </class>
9865
9866         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9867                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9868                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9869                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9870                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9871                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9872                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9873                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9874                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9875                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9876                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9877                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9878                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9879                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9880                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9881                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9882                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9883                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9884                 </fields>
9885                 <links>
9886                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9887                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9888                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9889                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9890                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9891                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9892                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9893                 </links>
9894         </class>
9895
9896         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9897                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9898                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9899                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9900                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9901                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9902                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9903                 </fields>
9904                 <links>
9905                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9906                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9907                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9908                 </links>
9909         </class>
9910
9911         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9912                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9913                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9914                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9915                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9916                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9917                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9918                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9919                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9920                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9921                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9922                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9923                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9924                 </fields>
9925                 <links>
9926                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9927                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9928                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9929                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9930                 </links>
9931         </class>
9932
9933         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9934                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9935                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9936                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9937                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9938                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9939                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9940                 </fields>
9941                 <links>
9942                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9943                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9944                 </links>
9945         </class>
9946
9947         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9948                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9949                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9950                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9951                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9952                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9953                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9954                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9955                 </fields>
9956                 <links>
9957                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9958                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9959                 </links>
9960         </class>
9961
9962         <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">
9963                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9964                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9965                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9966                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9967                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9968                 </fields>
9969                 <links>
9970                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9971                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9972                 </links>
9973         </class>
9974
9975         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9976                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9977                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9978                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9979                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9980                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9981                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9982                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9983                 </fields>
9984                 <links>
9985                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9986                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9987                 </links>
9988         </class>
9989
9990         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9991                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9992                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9993                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9994                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9995                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9996                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9997                 </fields>
9998                 <links>
9999                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10000                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10001                 </links>
10002         </class>
10003
10004         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10005                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10006                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10007                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10008                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10009                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10010                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10011                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10012                 </fields>
10013                 <links>
10014                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10015                 </links>
10016         </class>
10017
10018         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10019                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10020                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10021                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10022                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10023                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10024                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10025                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10026                 </fields>
10027                 <links>
10028                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10029                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10030                 </links>
10031         </class>
10032
10033         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10034                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10035                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10036                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10037                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10038                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10039                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10040                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10041                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10042                 </fields>
10043                 <links>
10044                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10045                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10046                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10047                 </links>
10048         </class>
10049
10050         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10051                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10052                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10053                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10054                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10055                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10056                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10057                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10058                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10059                 </fields>
10060                 <links>
10061                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10062                 </links>
10063         </class>
10064
10065         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10066                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10067                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10068                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10069                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10070                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10071                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10072                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10073                 </fields>
10074                 <links>
10075                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10076                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10077                 </links>
10078         </class>
10079
10080         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10081                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10082                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10083                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10084                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10085                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10086                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10087                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10088                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10089                 </fields>
10090                 <links>
10091                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10092                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10093                 </links>
10094         </class>
10095
10096         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10097                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10098                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10099                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10100                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10101                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10102                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10103                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10104                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10105                 </fields>
10106                 <links>
10107                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10108                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10109                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10110                 </links>
10111         </class>
10112
10113         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10114                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10115                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10116                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10117                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10118                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10119                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10120                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10121                 </fields>
10122                 <links>
10123                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10124                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10125                 </links>
10126         </class>
10127
10128         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10129                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10130                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10131                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10132                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10133                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10134                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10135                 </fields>
10136                 <links>
10137                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10138                 </links>
10139         </class>
10140
10141         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10142                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10143                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10144                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10145                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10146                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10147                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10148                 </fields>
10149                 <links>
10150                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10151                 </links>
10152         </class>
10153
10154         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10155                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10156                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10157                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10158                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10159                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10160                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10161                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10162                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10163                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10164                 </fields>
10165                 <links>
10166                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10167                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10168                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10169                 </links>
10170         </class>
10171
10172         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10173                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10174                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10175                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10176                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10177                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10178                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10179                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10180                 </fields>
10181                 <links>
10182                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10183                 </links>
10184         </class>
10185
10186         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10187                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10188                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10189                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10190                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10191                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10192                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10193                 </fields>
10194                 <links>
10195                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10196                 </links>
10197         </class>
10198
10199         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10200                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10201                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10202                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10203                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10204                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10205                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10206                 </fields>
10207                 <links>
10208                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10209                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10210                 </links>
10211         </class>
10212
10213         <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">
10214                 <fields oils_persist:primary="id">
10215                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10216                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10217                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10218                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10219                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10220                 </fields>
10221                 <links>
10222                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10223                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10224                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10225                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10226                 </links>
10227         </class>
10228
10229         <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">
10230                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10231                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10232                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10233                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10234                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10235                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10236                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10237                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10238                 </fields>
10239                 <links/>
10240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10241                         <actions>
10242                                 <retrieve/>
10243                         </actions>
10244                 </permacrud>
10245         </class>
10246
10247         <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">
10248                 <fields oils_persist:primary="ptype_key">
10249                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10251                 </fields>
10252                 <links/>
10253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10254                         <actions>
10255                                 <retrieve/>
10256                         </actions>
10257                 </permacrud>
10258         </class>
10259
10260         <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">
10261                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10262                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10263                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10264                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10265                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10266                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10267                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10268                 </fields>
10269                 <links>
10270                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10271                 </links>
10272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10273                         <actions>
10274                                 <retrieve/>
10275                         </actions>
10276                 </permacrud>
10277         </class>
10278
10279         <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">
10280                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10281                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10282                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10283                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10284                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10285                 </fields>
10286                 <links>
10287                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10288                 </links>
10289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10290                         <actions>
10291                                 <retrieve/>
10292                         </actions>
10293                 </permacrud>
10294         </class>
10295
10296     <class
10297         id="uvs"
10298         controller="open-ils.cstore open-ils.pcrud"
10299         oils_obj:fieldmapper="url_verify::session"
10300         oils_persist:tablename="url_verify.session"
10301         reporter:label="URL Verification Session"
10302     >
10303         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10304             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10305             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10306                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10307             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10308             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10309             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10310             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10311             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10312             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10313         </fields>
10314
10315         <links>
10316             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10317             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10318             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10319             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10320             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10321         </links>
10322
10323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10324             <actions>
10325                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10326             </actions>
10327         </permacrud>
10328
10329     </class>
10330
10331     <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">
10332         <oils_persist:source_definition>
10333             SELECT
10334                 cbrebi.id AS id,  -- so we can have a pkey in our view
10335                 uvs.id AS session,
10336                 uvs.owning_lib,
10337                 cbrebi.target_biblio_record_entry
10338             FROM url_verify.session uvs
10339             JOIN container.biblio_record_entry_bucket cbreb
10340                 ON (uvs.container = cbreb.id)
10341             JOIN container.biblio_record_entry_bucket_item cbrebi
10342                 ON (cbrebi.bucket = cbreb.id)
10343         </oils_persist:source_definition>
10344         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10345             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10346             <field reporter:label="Session" name="session" reporter:datatype="link" />
10347             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10348             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10349         </fields>
10350         <links>
10351             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10352             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10353             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10354         </links>
10355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10356             <actions>
10357                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10358             </actions>
10359         </permacrud>
10360     </class>
10361
10362     <class
10363         id="uvus"
10364         controller="open-ils.cstore open-ils.pcrud"
10365         oils_obj:fieldmapper="url_verify::url_selector"
10366         oils_persist:tablename="url_verify.url_selector"
10367         reporter:label="URL Verification URL Selector"
10368     >
10369         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10370             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10371             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10372                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10373             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10374         </fields>
10375
10376         <links>
10377             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10378             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10379         </links>
10380
10381         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10382             <actions>
10383                 <create permission="URL_VERIFY">
10384                     <context link="session" field="owning_lib"/>
10385                 </create>
10386                 <retrieve permission="URL_VERIFY">
10387                     <context link="session" field="owning_lib"/>
10388                 </retrieve>
10389                 <update permission="URL_VERIFY">
10390                     <context link="session" field="owning_lib"/>
10391                 </update>
10392                 <delete permission="URL_VERIFY">
10393                     <context link="session" field="owning_lib"/>
10394                 </delete>
10395             </actions>
10396         </permacrud>
10397
10398     </class>
10399
10400     <class
10401         id="uvu"
10402         controller="open-ils.cstore open-ils.pcrud"
10403         oils_obj:fieldmapper="url_verify::url"
10404         oils_persist:tablename="url_verify.url"
10405         reporter:label="URL Verification URL"
10406     >
10407         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10408             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10409                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10410                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10411                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10412                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10413             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10414             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10415             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10416             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10417             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10418             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10419             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10420             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10421             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10422             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10423             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10424             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10425             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10426         </fields>
10427
10428         <links>
10429             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10430             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10431             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10432             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10433             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10434         </links>
10435
10436         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10437             <actions>
10438                 <create permission="URL_VERIFY">
10439                     <context link="session" field="owning_lib"/>
10440                 </create>
10441                 <retrieve permission="URL_VERIFY">
10442                     <context link="session" field="owning_lib"/>
10443                 </retrieve>
10444                 <update permission="URL_VERIFY">
10445                     <context link="session" field="owning_lib"/>
10446                 </update>
10447                 <delete permission="URL_VERIFY">
10448                     <context link="session" field="owning_lib"/>
10449                 </delete>
10450             </actions>
10451         </permacrud>
10452
10453     </class>
10454
10455     <class
10456         id="uvva"
10457         controller="open-ils.cstore open-ils.pcrud"
10458         oils_obj:fieldmapper="url_verify::verification_attempt"
10459         oils_persist:tablename="url_verify.verification_attempt"
10460         reporter:label="URL Verification Attempt"
10461     >
10462         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10463             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10464                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10465                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10466             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10467             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10468         </fields>
10469
10470         <links>
10471             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10472             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10473         </links>
10474
10475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10476             <actions>
10477                 <create permission="URL_VERIFY">
10478                     <context link="session" field="owning_lib"/>
10479                 </create>
10480                 <retrieve permission="URL_VERIFY">
10481                     <context link="session" field="owning_lib"/>
10482                 </retrieve>
10483                 <update permission="URL_VERIFY">
10484                     <context link="session" field="owning_lib"/>
10485                 </update>
10486                 <delete permission="URL_VERIFY">
10487                     <context link="session" field="owning_lib"/>
10488                 </delete>
10489             </actions>
10490         </permacrud>
10491
10492     </class>
10493
10494     <class
10495         id="uvuv"
10496         controller="open-ils.cstore open-ils.pcrud"
10497         oils_obj:fieldmapper="url_verify::url_verification"
10498         oils_persist:tablename="url_verify.url_verification"
10499         reporter:label="URL Verification"
10500     >
10501         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10502             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10503                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10504                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10505             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10506             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10507             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10508             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10509                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10510         </fields>
10511
10512         <links>
10513             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10514             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10515             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10516         </links>
10517
10518         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10519             <actions>
10520                 <create permission="URL_VERIFY">
10521                     <context link="attempt" jump="session" field="owning_lib"/>
10522                 </create>
10523                 <retrieve permission="URL_VERIFY">
10524                     <context link="attempt" jump="session" field="owning_lib"/>
10525                 </retrieve>
10526                 <update permission="URL_VERIFY">
10527                     <context link="attempt" jump="session" field="owning_lib"/>
10528                 </update>
10529                 <delete permission="URL_VERIFY">
10530                     <context link="attempt" jump="session" field="owning_lib"/>
10531                 </delete>
10532             </actions>
10533         </permacrud>
10534
10535     </class>
10536
10537         <class
10538                 id="cfdi"
10539                 controller="open-ils.cstore open-ils.pcrud"
10540                 oils_obj:fieldmapper="config::filter_dialog_interface"
10541                 oils_persist:tablename="config.filter_dialog_interface"
10542                 reporter:label="FilterDialog Interface">
10543                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10544                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10545                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10546                 </fields>
10547                 <links>
10548                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10549                 </links>
10550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10551                         <actions>
10552                                 <retrieve />
10553                         </actions>
10554                 </permacrud>
10555         </class>
10556
10557         <class
10558                 id="cfdfs"
10559                 controller="open-ils.cstore open-ils.pcrud"
10560                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10561                 oils_persist:tablename="config.filter_dialog_filter_set"
10562                 reporter:label="FilterDialog Filter Set">
10563                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10565                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10566                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10567                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10568                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10569                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10570                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10571                 </fields>
10572                 <links>
10573                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10574                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10575                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10576                 </links>
10577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10578                         <actions>
10579                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10580                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10581                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10582                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10583                         </actions>
10584                 </permacrud>
10585
10586         </class>
10587
10588         <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">
10589                 <fields oils_persist:primary="code">
10590                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10591                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10592                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10593                 </fields>
10594                 <links/>
10595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10596                         <actions>
10597                                 <retrieve/>
10598                         </actions>
10599                 </permacrud>
10600         </class>
10601
10602         <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">
10603                 <oils_persist:source_definition>
10604
10605             SELECT  b.id,
10606                     MAX(dcp.edit_date) AS last_delete_date
10607              FROM   biblio.record_entry b
10608                     JOIN asset.call_number cn ON (cn.record = b.id)
10609                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10610              WHERE  NOT b.deleted
10611              GROUP BY b.id
10612              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10613
10614                 </oils_persist:source_definition>
10615                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10616                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10617                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10618                 </fields>
10619                 <links>
10620                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10621                 </links>
10622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10623                         <actions>
10624                                 <retrieve/>
10625                         </actions>
10626                 </permacrud>
10627         </class>
10628
10629         <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">
10630                 <oils_persist:source_definition>
10631
10632             -- -- 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.
10633             -- -- 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
10634             -- -- may not.
10635             -- SELECT
10636             --     bre.id AS bib_id,
10637             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10638             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10639             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10640             -- FROM (
10641                 SELECT
10642                     y.bre AS id,
10643                     COALESCE( x.copy_count, 0 ) AS copy_count,
10644                     y.hold_count AS hold_count,
10645                     (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
10646                 FROM (
10647                         SELECT
10648                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10649                             COUNT(*) AS hold_count
10650                         FROM action.hold_request h
10651                         WHERE
10652                             cancel_time IS NULL
10653                             AND fulfillment_time IS NULL
10654                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10655                         GROUP BY 1
10656                     )y LEFT JOIN (
10657                         SELECT 
10658                             (SELECT id
10659                                 FROM biblio.record_entry 
10660                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10661                             ) AS bre, 
10662                             COUNT(*) AS copy_count
10663                         FROM asset.copy
10664                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10665                         WHERE copy.holdable 
10666                             AND NOT copy.deleted 
10667                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10668                         GROUP BY 1
10669                     )x ON x.bre = y.bre
10670                 -- )z RIGHT JOIN (
10671                 --     SELECT id
10672                 --     FROM biblio.record_entry
10673                 --     WHERE NOT deleted
10674                 -- )bre ON (z.bib_id = bre.id)
10675                 
10676
10677                 </oils_persist:source_definition>
10678                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10679                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10680                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10681                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10682                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10683                 </fields>
10684                 <links>
10685                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10686                 </links>
10687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10688                         <actions>
10689                                 <retrieve/>
10690                         </actions>
10691                 </permacrud>
10692         </class>
10693
10694         <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">
10695                 <oils_persist:source_definition>
10696             SELECT *,
10697                 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,
10698                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10699             FROM
10700                 (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
10701                     FROM
10702                         action.hold_request ahr
10703                         JOIN reporter.hold_request_record rhrr USING (id)
10704                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10705                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10706                     WHERE
10707                         ahr.cancel_time IS NULL
10708                         AND ahr.fulfillment_time IS NULL
10709                     GROUP BY bib_record, pickup_lib
10710                 )x
10711                 JOIN
10712                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10713                     FROM
10714                         action.hold_request ahr
10715                         JOIN reporter.hold_request_record rhrr USING (id)
10716                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10717                     WHERE
10718                         ahr.cancel_time IS NULL
10719                         AND ahr.fulfillment_time IS NULL
10720                     GROUP BY bib_record
10721                 )y
10722                 USING (id)
10723                 </oils_persist:source_definition>
10724                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10725                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10726                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10727                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10728                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10729                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10730                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10731                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10732                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10733                 </fields>
10734                 <links>
10735                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10736                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10737                 </links>
10738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10739                         <actions>
10740                                 <retrieve/>
10741                         </actions>
10742                 </permacrud>
10743         </class>
10744
10745         <class id="rhcrpbapd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup_desc" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library (and Descendants) ">
10746                 <oils_persist:source_definition>
10747             WITH counts_at_ou AS (
10748                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10749                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10750                 FROM action.hold_request ahr
10751                 JOIN reporter.hold_request_record rhrr USING (id)
10752                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10753                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10754                 WHERE ahr.cancel_time IS NULL
10755                 AND ahr.fulfillment_time IS NULL
10756                 GROUP BY bib_record, pickup_lib
10757             )
10758             SELECT *,
10759                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE holds_at_or_below::FLOAT/copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
10760                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10761             FROM
10762                 (SELECT bib_record AS id, aou.id AS pickup_lib_or_desc, SUM(holds_at_pickup_library) AS holds_at_or_below, SUM(copy_count_at_pickup_library) AS copy_count_at_or_below
10763                 FROM actor.org_unit aou
10764                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10765                 GROUP BY bib_record, pickup_lib_or_desc
10766                 )x
10767                 JOIN
10768                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10769                     FROM
10770                         action.hold_request ahr
10771                         JOIN reporter.hold_request_record rhrr USING (id)
10772                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10773                     WHERE
10774                         ahr.cancel_time IS NULL
10775                         AND ahr.fulfillment_time IS NULL
10776                     GROUP BY bib_record
10777                 )y
10778                 USING (id)
10779                 </oils_persist:source_definition>
10780                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10781                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10782                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10783                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10784                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10785                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10786                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10787                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10788                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10789                 </fields>
10790                 <links>
10791                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10792                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10793                 </links>
10794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10795                         <actions>
10796                                 <retrieve/>
10797                         </actions>
10798                 </permacrud>
10799         </class>
10800
10801         <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">
10802                 <oils_persist:source_definition>
10803             SELECT
10804                 ac.id,
10805                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10806                 MAX(actac.xact_start) AS last_circ
10807             FROM asset.copy ac
10808                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10809             GROUP BY ac.id
10810
10811             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10812             --SELECT
10813             --    ac.id,
10814             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10815             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10816             --FROM asset.copy ac
10817             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10818             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10819             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10820                 </oils_persist:source_definition>
10821                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10822                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10823                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10824                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10825                 </fields>
10826                 <links>
10827                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10828                 </links>
10829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10830                         <actions>
10831                                 <retrieve/>
10832                         </actions>
10833                 </permacrud>
10834         </class>
10835
10836         <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">
10837                 <fields oils_persist:primary="id">
10838                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10839                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10840                 </fields>
10841                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10842                         <actions>
10843                                 <retrieve/>
10844                         </actions>
10845                 </permacrud>
10846         </class>
10847
10848         <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">
10849                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10850                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10851                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10852                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10853                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10854                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10855                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10856                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10857                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10858                 </fields>
10859                 <links>
10860                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10861                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10862                 </links>
10863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10864                         <actions>
10865                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10866                                 <retrieve/>
10867                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10868                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10869                         </actions>
10870                 </permacrud>
10871         </class>
10872
10873         <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">
10874                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10875                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10876                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10877                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10878                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10879                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10880                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10881                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10882                 </fields>
10883                 <links>
10884                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10885                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10886                 </links>
10887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10888                         <actions>
10889                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10890                                 <retrieve/>
10891                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10892                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10893                         </actions>
10894                 </permacrud>
10895         </class>
10896
10897
10898         <!-- ********************************************************************************************************************* -->
10899         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10900         <!-- ********************************************************************************************************************* -->
10901         <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">
10902                 <fields oils_persist:primary="id">
10903                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10904                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10905                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10906                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10907                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10908                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10909                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10910                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10911                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10912                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10913                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10914                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10915                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10916                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10917                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10918                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10919                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10920                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10921                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10922                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10923                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10924                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10925                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10926                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10927                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10928                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10929                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10930                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10931                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10932                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10933                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10934                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10935                 </fields>
10936                 <links>
10937                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10938                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10939                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10940                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10941                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10942                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10943                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10944                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10945                 </links>
10946         </class>
10947
10948         <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">
10949                 <fields oils_persist:primary="id">
10950                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10951                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10952                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10953                 </fields>
10954                 <links>
10955                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10956                 </links>
10957         </class>
10958
10959         <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">
10960                 <fields oils_persist:primary="id">
10961                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10962                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10963                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10964                 </fields>
10965                 <links>
10966                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10967                 </links>
10968         </class>
10969
10970         <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">
10971                 <fields oils_persist:primary="id">
10972                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10973
10974                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10975                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10976                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10977
10978                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10979                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10980                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10981
10982                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10983                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10984
10985                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10986                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10987                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10988
10989                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10990                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10991
10992                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10993                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10994                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10995
10996                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10997                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10998                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10999
11000                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11001                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11002                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11003                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11004
11005                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11006                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11007
11008                 </fields>
11009                 <links>
11010                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11011                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11012                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11013                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11014                 </links>
11015         </class>
11016
11017         <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">
11018                 <oils_persist:source_definition>
11019
11020             SELECT
11021                 po.ordering_agency AS ordering_agency,
11022                 po.id AS purchase_order,
11023                 li.id AS lineitem,
11024                 lid.id AS lineitem_detail,
11025                 cpa.id AS claim_policy_action
11026             FROM
11027                 acq.lineitem_detail lid
11028                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11029                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11030                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11031                 JOIN acq.claim_policy_action cpa ON (
11032                     cpa.claim_policy = cp.id
11033
11034                     -- we only care about claim policy actions whose claim
11035                     -- interval we'd reached or exceeded
11036                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11037
11038                     -- filter out all claim policy actions where claim events
11039                     -- have occurred on or after the action's action_interval
11040                     AND NOT EXISTS (
11041                         SELECT 1
11042                         FROM
11043                             acq.claim_event evt
11044                             JOIN acq.claim claim ON (
11045                                 claim.id = evt.claim
11046                                 AND claim.lineitem_detail = lid.id
11047                             )
11048                         WHERE
11049                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11050                     )
11051                 )
11052             WHERE
11053                 lid.cancel_reason IS NULL
11054                 AND li.cancel_reason IS NULL -- belt/suspenders
11055                 AND po.cancel_reason IS NULL -- belt/suspenders
11056                 AND lid.recv_time IS NULL
11057                 AND po.state = 'on-order'
11058             ORDER BY 1, 2, 3, 4, 5
11059
11060                 </oils_persist:source_definition>
11061                 <fields>
11062                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11063                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11064                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11065                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11066                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11067                 </fields>
11068                 <links>
11069                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11070                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11071                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11072                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11073                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11074                 </links>
11075         </class>
11076         <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">
11077                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11078                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11079                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11080                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11081                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11082                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11083                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11084                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11085                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11086                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11087                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11088                 </fields>
11089                 <links>
11090                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11091                 </links>
11092     </class>
11093         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11094                 <oils_persist:source_definition>
11095             SELECT * FROM acq.lineitem_summary 
11096                                 WHERE item_count > (invoice_count + cancel_count)
11097         </oils_persist:source_definition>
11098                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11099                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11100                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11101                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11102                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11103                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11104                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11105                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11106                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11107                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11108                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11109                 </fields>
11110                 <links>
11111                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11112                 </links>
11113     </class>
11114         <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">
11115                 <oils_persist:source_definition>
11116
11117                         SELECT  t.*
11118                           FROM  action.transit_copy t
11119                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11120                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11121                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11122
11123                 </oils_persist:source_definition>
11124                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11125                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11126                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11127                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11128                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11129                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11130                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11131                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11132                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11133                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11134                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11135                 </fields>
11136                 <links>
11137                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11138                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11139                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11140                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11141                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11142                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11143                 </links>
11144         </class>
11145
11146     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11147                 <oils_persist:source_definition>
11148
11149         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11150                 SELECT
11151                         cp.id as copy,
11152                         COUNT(circ.id),
11153                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11154                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11155                 FROM
11156                         asset.copy cp
11157                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11158                 GROUP BY 1, 3, 4
11159                 UNION ALL
11160                 SELECT
11161                         cp.id as copy,
11162                         COUNT(circ.id),
11163                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11164                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11165                 FROM
11166                         asset.copy cp
11167                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11168                 GROUP BY 1, 3, 4
11169                 UNION ALL
11170                 SELECT
11171                         id as copy,
11172                         circ_count,
11173                         -1 AS year,
11174                         false as is_renewal
11175                 FROM
11176                         extend_reporter.legacy_circ_count
11177         )x GROUP BY 1, 3, 4
11178
11179                 </oils_persist:source_definition>
11180         <fields>
11181             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11182             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11183             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11184             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11185         </fields>
11186                 <links>
11187                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11188                 </links>
11189                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11190                         <actions>
11191                                 <retrieve/>
11192                         </actions>
11193                 </permacrud>
11194     </class>
11195
11196         <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">
11197                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11198                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11199                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11200                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11201                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11202                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11203                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11204                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11205                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11206                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11207                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11208                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11209                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11210                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11211                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11212                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11213                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11214                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11215                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11216                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11217                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11218                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11219                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11220                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11221                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11222                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11223                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11224                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11225                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11226                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11227                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11228                 </fields>
11229                 <links>
11230                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11231                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11232                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11233                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11234                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11235                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11236                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11237                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11238                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11239                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11240                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11241                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11242                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11243                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11244                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11245                 </links>
11246         </class>
11247
11248     <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">
11249         <fields oils_persist:primary="id">
11250             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11251             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11252             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11253             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11254             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11255             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11256             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11257             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11258             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11259             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11260             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11261             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11262             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11263             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11264             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11265             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11266             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11267             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11268             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11269             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11270             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11271             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11272             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11273             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11274             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11275             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11276             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11277             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11278             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11279             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11280             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11281             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11282             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11283             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11284         </fields>
11285         <links>
11286             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11287             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11288             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11289             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11290             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11291             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11292             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11293             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11294         </links>
11295     </class>
11296
11297     <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">
11298         <fields oils_persist:primary="id">
11299             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11300             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11301             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11302             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11303         </fields>
11304         <links>
11305             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11306             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11307         </links>
11308     </class>
11309
11310     <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">
11311         <fields oils_persist:primary="owning_lib">
11312             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11313             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11314             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11315         </fields>
11316         <links>
11317             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11318         </links>
11319     </class>
11320
11321     <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">
11322         <fields oils_persist:primary="id">
11323             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11324             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11325             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11326             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11327             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11328         </fields>
11329         <links>
11330             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11331             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11332             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11333         </links>
11334     </class>
11335
11336     <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">
11337         <fields oils_persist:primary="circ_lib">
11338             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11339             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11340             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11341             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11342         </fields>
11343         <links>
11344             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11345             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11346         </links>
11347     </class>
11348
11349     <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">
11350         <fields oils_persist:primary="id">
11351             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11352             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11353             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11354             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11355             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11356         </fields>
11357         <links>
11358             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11359             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11360             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11361         </links>
11362     </class>
11363
11364     <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">
11365         <fields oils_persist:primary="home_ou">
11366             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11367             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11368             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11369             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11370         </fields>
11371         <links>
11372             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11373             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11374         </links>
11375     </class>
11376         <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">
11377                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11378                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11379                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11380                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11381                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11382                 </fields>
11383                 <links>
11384                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11385                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11386                 </links>
11387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11388                         <actions>
11389                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11390                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11391                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11392                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11393                         </actions>
11394                 </permacrud>
11395         </class>
11396         <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">
11397                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11398                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11399                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11400                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11401                 </fields>
11402                 <links>
11403                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11404                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11405                         </links>
11406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11407                 <actions>
11408                                 <create permission="ADMIN_ACQ_FUND_TAG">
11409                                         <context link="tag" field="owner"/>
11410                                 </create>
11411                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11412                                         <context link="tag" field="owner"/>
11413                                 </retrieve>
11414                                 <update permission="ADMIN_ACQ_FUND_TAG">
11415                                         <context link="tag" field="owner"/>
11416                                 </update>
11417                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11418                                         <context link="tag" field="owner"/>
11419                                 </delete>
11420                         </actions>
11421                 </permacrud>
11422         </class>
11423         <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">
11424                 <oils_persist:source_definition><![CDATA[
11425                 SELECT
11426                         poi.purchase_order AS purchase_order,
11427                         ii.invoice AS invoice,
11428                         NULL AS lineitem,
11429                         poi.id AS po_item,
11430                         NULL AS picklist
11431                 FROM
11432                         acq.po_item poi
11433                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11434                 UNION SELECT
11435                         jub.purchase_order AS purchase_order,
11436                         ie.invoice AS invoice,
11437                         jub.id AS lineitem,
11438                         NULL AS po_item,
11439                         jub.picklist AS picklist
11440                 FROM
11441                         acq.lineitem jub
11442                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11443                 UNION SELECT
11444                         ii.purchase_order AS purchase_order,
11445                         ii.invoice AS invoice,
11446                         NULL AS lineitem,
11447                         NULL AS po_item,
11448                         NULL AS picklist
11449                 FROM
11450                         acq.invoice_item ii
11451                 WHERE ii.po_item IS NULL
11452                 UNION SELECT
11453                         ie.purchase_order AS purchase_order,
11454                         ie.invoice AS invoice,
11455                         NULL AS lineitem,
11456                         NULL AS po_item,
11457                         NULL AS picklist
11458                 FROM
11459                         acq.invoice_entry ie
11460                 WHERE ie.lineitem IS NULL
11461                 UNION SELECT
11462                         NULL AS purchase_order,
11463                         NULL AS invoice,
11464                         jub.id AS lineitem,
11465                         NULL AS po_item,
11466                         jub.picklist AS picklist
11467                 FROM
11468                         acq.lineitem jub
11469                 WHERE jub.purchase_order IS NULL
11470                 ]]></oils_persist:source_definition>
11471                 <fields>
11472                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11473                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11474                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11475                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11476                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11477                 </fields>
11478                 <links>
11479                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11480                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11481                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11482                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11483                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11484                 </links>
11485         </class>
11486         <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">
11487                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11488                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11489                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11490                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11491                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11492                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11493                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11494                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11495                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11496                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11497                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11498                 </fields>
11499                 <links>
11500                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11501                 </links>
11502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11503                         <actions>
11504                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11505                                 <retrieve/>
11506                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11507                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11508                         </actions>
11509                 </permacrud>
11510         </class>
11511
11512         <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">
11513                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11514                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11515                         <field name="date_applied" reporter:datatype="timestamp"/>
11516                         <field name="org" reporter:datatype="org_unit"/>
11517                         <field name="original_value" reporter:datatype="text"/>
11518                         <field name="new_value" reporter:datatype="text"/>
11519                         <field name="field_name" reporter:datatype="link"/>
11520                 </fields>
11521                 <links>
11522                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11523                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11524                 </links>
11525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11526                         <actions>
11527                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11528                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11529                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11530                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11531                         </actions>
11532                 </permacrud>
11533         </class>
11534         <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">
11535                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11536                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11537                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11538                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11539                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11540                 </fields>
11541                 <links>
11542                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11543                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11544                 </links>
11545         </class>
11546         <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">
11547                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11548                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11549                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11550                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11551                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11552                 </fields>
11553                 <links>
11554                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11555                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11556                 </links>
11557         </class>
11558         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
11559                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11561                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11562                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11563                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11564                 </fields>
11565                 <links>
11566                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11567                 </links>
11568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11569                         <actions>
11570                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11571                                 <retrieve/>
11572                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11573                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11574                         </actions>
11575                 </permacrud>
11576         </class>
11577         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
11578                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11579                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11580                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11581                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11582                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11583                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11584                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11585                 </fields>
11586                 <links>
11587                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11588                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11589                 </links>
11590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11591                         <actions>
11592                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11593                                 <retrieve/>
11594                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11595                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11596                         </actions>
11597                 </permacrud>
11598         </class>
11599         <class id="hasholdscount" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::has_holds_count" reporter:label="Copy Has Holds Count" oils_persist:readonly="true">
11600         <oils_persist:source_definition>
11601         SELECT ahcm.target_copy AS id,count(*) AS count
11602          FROM
11603          action.hold_request ahr,
11604          action.hold_copy_map ahcm
11605          WHERE
11606          ahr.cancel_time IS NULL AND
11607          ahr.fulfillment_time IS NULL AND
11608          ahr.capture_time IS NULL AND
11609          ahr.id = ahcm.hold
11610          GROUP BY ahcm.target_copy
11611         </oils_persist:source_definition>
11612         <fields oils_persist:primary="id">
11613             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11614             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11615         </fields>
11616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11617             <actions>
11618                <retrieve/>
11619             </actions>
11620         </permacrud>
11621         </class>
11622
11623         <!-- ********************************************************************************************************************* -->
11624
11625 </IDL>
11626
11627 <!--
11628     vim:noet:ts=4:sw=4:
11629 -->