]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1207533: item-oriented Triggered Event Log
[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                         <field name="debit_card_payment" oils_persist:virtual="true" />
98                 </fields>
99                 <links>
100                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
101                 </links>
102         </class>
103
104         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
105                 <fields>
106                         <field name="id" oils_persist:virtual="true" />
107                         <field name="children" oils_persist:virtual="true" />
108                         <field name="owner_doc" oils_persist:virtual="true" />
109                         <field name="intra_doc_id" oils_persist:virtual="true" />
110                         <field name="parent_node" oils_persist:virtual="true" />
111                         <field name="node_type" oils_persist:virtual="true" />
112                         <field name="namespace_uri" oils_persist:virtual="true" />
113                         <field name="name" oils_persist:virtual="true" />
114                         <field name="value" oils_persist:virtual="true" />
115                 </fields>
116         </class>
117
118         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
119                 <fields>
120                         <field name="title" oils_persist:virtual="true" />
121                         <field name="author" oils_persist:virtual="true" />
122                         <field name="doc_id" oils_persist:virtual="true" />
123                         <field name="doc_type" oils_persist:virtual="true" />
124                         <field name="pubdate" oils_persist:virtual="true" />
125                         <field name="isbn" oils_persist:virtual="true" />
126                         <field name="publisher" oils_persist:virtual="true" />
127                         <field name="tcn" oils_persist:virtual="true" />
128                         <field name="subject" oils_persist:virtual="true" />
129                         <field name="types_of_resource" oils_persist:virtual="true" />
130                         <field name="call_numbers" oils_persist:virtual="true" />
131                         <field name="edition" oils_persist:virtual="true" />
132                         <field name="online_loc" oils_persist:virtual="true" />
133                         <field name="synopsis" oils_persist:virtual="true" />
134                         <field name="physical_description" oils_persist:virtual="true" />
135                         <field name="toc" oils_persist:virtual="true" />
136                         <field name="copy_count" oils_persist:virtual="true" />
137                         <field name="series" oils_persist:virtual="true" />
138                         <field name="serials" oils_persist:virtual="true" />
139                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
140                 </fields>
141         </class>
142
143         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
144                 <fields>
145                         <field name="err_msg" oils_persist:virtual="true" />
146                         <field name="type" oils_persist:virtual="true" />
147                 </fields>
148         </class>
149
150         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
151                 <fields>
152                         <field name="err_msg" oils_persist:virtual="true" />
153                         <field name="type" oils_persist:virtual="true" />
154                 </fields>
155         </class>
156
157         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
158                 <fields oils_persist:primary="matchpoint">
159                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
160                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
161                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
162                 </fields>
163                 <links>
164                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
165                 </links>
166         </class>
167
168         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
169         <!-- when the time is right, turn me into a view.  -->
170                 <fields>
171             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
172             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
174             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
176             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
177             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
179             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
180             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
181                 </fields>
182         </class>
183
184         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
185                 <fields>
186                         <field name="public_name" oils_persist:virtual="true" />
187                         <field name="target_url" oils_persist:virtual="true" />
188                         <field name="target_coverage" oils_persist:virtual="true" />
189                         <field name="target_embargo" oils_persist:virtual="true" />
190                 </fields>
191         </class>
192
193         <!-- Actually in the DB -->
194         <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">
195                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
196                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
197                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
199                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
200                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
201                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
202                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
203                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
204                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
205                 </fields>
206                 <links>
207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
208                 </links>
209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
210                         <actions>
211                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
212                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
213                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
214                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
215                         </actions>
216                 </permacrud>
217         </class>
218
219         <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">
220                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
221                         <field reporter:label="Field ID" name="id" reporter:datatype="id" reporter:selector="field"/>
222                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
223                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
224                 </fields>
225                 <links>
226                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
227                 </links>
228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
229                         <actions>
230                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </create>
233                                 <retrieve/>
234                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </update>
237                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
238                     <context link="grp" field="owner"/>
239                 </delete>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <class  id="rrbs" 
245             controller="open-ils.cstore open-ils.pcrud" 
246             oils_obj:fieldmapper="rating::record_badge_score" 
247             oils_persist:tablename="rating.record_badge_score" 
248             reporter:label="Statistical Popularity Badge">
249                 <fields oils_persist:primary="id" 
250                 oils_persist:sequence="rating.record_badge_score_id_seq">
251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
252                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
253                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
254                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
255                 </fields>
256         <links>
257             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
258             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
259         </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <retrieve/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267         <class  id="rp" 
268             controller="open-ils.cstore open-ils.pcrud" 
269             oils_obj:fieldmapper="rating::popularity_parameter" 
270             oils_persist:tablename="rating.popularity_parameter" 
271             reporter:label="Statistical Popularity Parameter">
272                 <fields oils_persist:primary="id" 
273                 oils_persist:sequence="rating.popularity_parameter_id_seq">
274                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
275                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
276                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
277                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
278                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
279                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
280                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
281                 </fields>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
285                                 <retrieve/>
286                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
287                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <class  id="rb" 
293             controller="open-ils.cstore open-ils.pcrud" 
294             oils_obj:fieldmapper="rating::badge" 
295             oils_persist:tablename="rating.badge" 
296             reporter:label="Statistical Popularity Badge">
297                 <fields oils_persist:primary="id" 
298                 oils_persist:sequence="rating.badge_id_seq">
299                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
303                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
304                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
307                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
308                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
309                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
310                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
311                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
312                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
313                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
314                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
315                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
316                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
317                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
318                 </fields>
319                 <links>
320                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
321                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
322                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
323                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
324                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
329                                 <retrieve/>
330                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
331                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <class  id="vibtg" 
337             controller="open-ils.cstore open-ils.pcrud" 
338             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
339             oils_persist:tablename="vandelay.import_bib_trash_group" 
340             reporter:label="Import/Overlay Field Groups for Removal">
341                 <fields oils_persist:primary="id" 
342                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
346                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
347                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
352                 </links>
353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
354                         <actions>
355                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                                 <retrieve/>
357                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
358                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                         </actions>
360                 </permacrud>
361         </class>
362
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
366                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
368                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
369                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
370                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
371                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
372                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
373                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
374                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
375                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
376                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
377                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
378                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
379                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
380                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
382                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
383                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
384                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
385                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
386                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
387                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
388                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
389                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
390                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
391                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
392                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
393                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
394                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
395                 </fields>
396                 <links>
397                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
398                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
399                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <create permission="CREATE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </create>
407                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </retrieve>
410                                 <update permission="UPDATE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </update>
413                                 <delete permission="DELETE_IMPORT_ITEM">
414                     <context link="definition" field="owner"/>
415                                 </delete>
416                         </actions>
417                 </permacrud>
418         </class>
419
420         <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">
421                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
423                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
424                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
425                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
426                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
427                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
428                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
429                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
430                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
431                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
432                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
433                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
434                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
435                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
436                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
437                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
438                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
439                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
440                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
441                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
442                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
443                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
444                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
445                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
446                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
447                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
448                 </fields>
449                 <links>
450                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
451                 </links>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <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"/>
456                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
457                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <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">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
464                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
465                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
467                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
468                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
469                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
470                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
471                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
472                 </fields>
473                 <links>
474                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
475                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
476                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
477                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
478                 </links>
479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
480                         <actions>
481                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
485                         </actions>
486                 </permacrud>
487         </class>
488
489         <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">
490                 <fields oils_persist:primary="code">
491                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
493                 </fields>
494                 <links>
495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
496                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
497                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
498                 </links>
499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
500                         <actions>
501                                 <retrieve/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <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">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
508                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
509                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
510                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
512                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
513                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
514                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
515                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
516                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
517                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
518                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
522                 </fields>
523                 <links>
524                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
525                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
526                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
527                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
528             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
529             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
530             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
531                 </links>
532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
533                         <actions>
534                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
538                         </actions>
539                 </permacrud>
540         </class>
541
542         <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">
543                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
545                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
546                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
547                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
548                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
549                 </fields>
550                 <links/>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
554                 <retrieve/>
555                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
556                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
563                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
565                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
566                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
567                 </fields>
568                 <links>
569                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
570                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
571                 </links>
572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573                         <actions>
574                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
578                         </actions>
579                 </permacrud>
580         </class>
581
582         <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">
583                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
584                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
585                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
586                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
587                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
588                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
589                 </fields>
590                 <links>
591                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
592                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
593                 </links>
594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
595                         <actions>
596                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
600                         </actions>
601                 </permacrud>
602         </class>
603
604         <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">
605                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
606                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
607                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
609                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
610                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
611                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
612                 </fields>
613                 <links>
614                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
615                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
616                 </links>
617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618                         <actions>
619                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                         </actions>
624                 </permacrud>
625         </class>
626
627         <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">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
629                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
630                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
631                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
633                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
634                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
635                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
636                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
637                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
638                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
639                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
641                 </fields>
642                 <links>
643                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
644                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
645                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
646             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
647             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
648                 </links>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <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">
660                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
662                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
665                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
666                 </fields>
667                 <links/>
668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669                         <actions>
670                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                 <retrieve/>
672                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
673                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                         </actions>
675                 </permacrud>
676         </class>
677
678         <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">
679                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
680                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
681                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
682                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
683                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
684                 </fields>
685                 <links>
686                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
687                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
688                 </links>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
701                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
703                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
704                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
705                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
706                 </fields>
707                 <links>
708                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
709                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
710                 </links>
711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
712                         <actions>
713                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                         </actions>
718                 </permacrud>
719         </class>
720
721         <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">
722                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
723                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
724                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
726                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
727                 </fields>
728                 <links>
729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
730                 </links>
731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
732                         <actions>
733                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                         </actions>
738                 </permacrud>
739         </class>
740
741         <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">
742                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
743                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
744                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
745                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
746                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
747                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
748                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
749                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
750             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
751                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
752                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
753                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
754                 </fields>
755                 <links>
756                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
757                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
758                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
759                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
760                 </links>
761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
762                         <actions>
763                                 <create permission="ADMIN_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </create>
766                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </retrieve>
769                                 <update permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </update>
772                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
773                     <context link="match_set" field="owner"/>
774                                 </delete>
775                         </actions>
776                 </permacrud>
777         </class>
778
779         <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">
780                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
781                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
782                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
783                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
784                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
785                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
786                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
787                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
788                 </fields>
789                 <links>
790                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
791                 </links>
792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
793                         <actions>
794                                 <create permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </create>
797                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </retrieve>
800                                 <update permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </update>
803                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
804                     <context link="match_set" field="owner"/>
805                                 </delete>
806                         </actions>
807                 </permacrud>
808         </class>
809
810         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
811                 oils_obj:fieldmapper="vandelay::session_tracker" 
812                 oils_persist:tablename="vandelay.session_tracker" 
813                 reporter:label="Vandelay Session Tracker">
814                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
815                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
818                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
819                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
820                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
821                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
822                                          queue or an auth queue and there's no IDL class for vandelay.queue .
823                                          parent table.
824                         -->
825                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
826                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
827                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="State" name="state" reporter:datatype="text"/>
829                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
830                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
831                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
832                 </fields>
833                 <links>
834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
835                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
836                 </links>
837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
838                         <actions>
839                                 <!-- created by the API -->
840                                 <retrieve global_required="true"
841                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
842                                 <update global_required="true"
843                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
844                                         <context link="workstation" field="owning_lib"/>
845                                 </update>
846                                 <delete 
847                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
848                                         <context link="workstation" field="owning_lib"/>
849                                 </delete>
850                         </actions>
851                 </permacrud>
852         </class>
853
854         <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">
855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
856                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
857                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
858                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
860                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
861                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
862                 </fields>
863                 <links>
864                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
866                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
868                 </links>
869         </class>
870
871     <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">
872         <fields oils_persist:primary="name">
873             <field reporter:label="Name" name="name" reporter:datatype="text"/>
874             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
875             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
876             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
877         </fields>
878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
879             <actions>
880                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884             </actions>
885         </permacrud>
886     </class>
887
888     <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">
889         <fields oils_persist:primary="id">
890             <field reporter:label="ID" name="id" reporter:datatype="id"/>
891             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
892             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
894             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
895         </fields>
896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897             <actions>
898                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899                 <retrieve/>
900                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
901                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902             </actions>
903         </permacrud>
904     </class>
905
906         <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">
907                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
909                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
910                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
911                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
912                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
913                 </fields>
914                 <links>
915                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
916                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921                 <retrieve/>
922                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
923                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924             </actions>
925         </permacrud>
926         </class>
927
928         <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">
929                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
930                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
931                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
933         </fields>
934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935             <actions>
936                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
937                 <retrieve/>
938                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
939                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
940             </actions>
941         </permacrud>
942         </class>
943
944         <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">
945                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
946                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
947                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
948                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
949                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
953                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
954                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
955                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
956                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
957         </fields>
958                 <links>
959                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
961         </links>
962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
963             <actions>
964                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
965                 <retrieve/>
966                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
967                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
968             </actions>
969         </permacrud>
970         </class>
971
972         <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">
973                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
974                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
975                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
976                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
980                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
981                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
982                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
983                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
984         </fields>
985                 <links>
986                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
988         </links>
989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
990             <actions>
991                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
992                 <retrieve/>
993                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
994                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
995             </actions>
996         </permacrud>
997         </class>
998
999         <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">
1000                 <fields oils_persist:primary="name">
1001                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1002                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1004                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1005                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1006                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1007                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1008                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1009                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1010                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1011                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1012                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1013                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1014                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1015                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1016                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1017                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1018                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1019                 </fields>
1020                 <links>
1021                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1022                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_SVF" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_SVF" global_required="true"/>
1029                 <delete permission="ADMIN_SVF" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <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">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1037                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1038                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1039             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1040                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1041                 </fields>
1042                 <links/>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046                 <retrieve/>
1047                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1048                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <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">
1054                 <fields oils_persist:primary="coded_value">
1055                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1056                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1057                 </fields>
1058                 <links>
1059                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1060                 </links>
1061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1062             <actions>
1063                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1064                 <retrieve/>
1065                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1066                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1067             </actions>
1068         </permacrud>
1069         </class>
1070
1071         <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">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1073                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1074                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1075                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1076                 </fields>
1077                 <links>
1078                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1079                 </links>
1080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1081             <actions>
1082                 <retrieve/>
1083             </actions>
1084         </permacrud>
1085         </class>
1086
1087
1088         <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">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1090                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1091                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1092                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1093                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1094                 </fields>
1095                 <links>
1096                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1097                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
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
1107         <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">
1108                 <fields oils_persist:primary="source">
1109                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1110                         <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 -->
1111                 </fields>
1112                 <links>
1113                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1114                 </links>
1115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116             <actions>
1117                 <retrieve/>
1118             </actions>
1119         </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields>
1124                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1125                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1126                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1127                 </fields>
1128                 <links>
1129                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1130                 </links>
1131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1132             <actions>
1133                 <retrieve/>
1134             </actions>
1135         </permacrud>
1136         </class>
1137
1138         <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">
1139                 <fields oils_persist:primary="id">
1140                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1141                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1142                 </fields>
1143                 <links>
1144                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <retrieve/>
1149             </actions>
1150         </permacrud>
1151         </class>
1152
1153         <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">
1154                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1156                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1157                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1158                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1159                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1160                 </fields>
1161                 <links>
1162                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1163                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1164                 </links>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1170                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <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">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1177                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1178                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1179                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1180                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1181                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1182                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1183                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1185             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1186             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1187                 </fields>
1188                 <links>
1189                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1190                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1191                 </links>
1192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1193             <actions>
1194                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1195                 <retrieve/>
1196                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1197                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1198             </actions>
1199         </permacrud>
1200         </class>
1201
1202         <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">
1203                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1204                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1205                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1206                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1207                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1208                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1209                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1210                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1211                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1212                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1213                 </fields>
1214                 <links>
1215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1216                 </links>
1217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218             <actions>
1219                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223             </actions>
1224         </permacrud>
1225         </class>
1226
1227     <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">
1228         <fields oils_persist:primary="name">
1229             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1230             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1231             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1232             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1233             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1234             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1235             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1236             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1237             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1238             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1239         </fields>
1240         <links>
1241             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1242             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1243         </links>
1244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1245             <actions>
1246                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247                 <retrieve/>
1248                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1249                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250             </actions>
1251         </permacrud>
1252     </class>
1253
1254     <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">
1255         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1256             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1257             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1258             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1259             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1260             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1261             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1262             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1263         </fields>
1264         <links>
1265             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1266         </links>
1267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1268             <actions>
1269                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270                 <retrieve/>
1271                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1272                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273             </actions>
1274         </permacrud>
1275     </class>
1276
1277     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1278                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1279                         oils_persist:tablename="config.z3950_index_field_map" 
1280                         reporter:label="Z39.50 Index Field Map">
1281         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1282             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1283             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1284             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1285             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1286             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1288         </fields>
1289         <links>
1290             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1291             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1292             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1293         </links>
1294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1295             <actions>
1296                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297                 <retrieve/>
1298                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1299                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300             </actions>
1301         </permacrud>
1302     </class>
1303
1304
1305         <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">
1306                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1307                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1308                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1309                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1310                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1311                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1312                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                 </fields>
1314                 <links>
1315             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1316             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1317                 </links>
1318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1319                         <actions>
1320                                 <retrieve/>
1321                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1322                         </actions>
1323                 </permacrud>
1324         </class>
1325
1326         <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">
1327                 <fields oils_persist:primary="key">
1328                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1329                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1330                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1331                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1332                 </fields>
1333                 <links/>
1334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335                         <actions>
1336                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1337                                 <retrieve/>
1338                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1339                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1340                         </actions>
1341                 </permacrud>
1342         </class>
1343
1344         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1345                 <fields oils_persist:primary="module">
1346                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1348                 </fields>
1349                 <links/>
1350         </class>
1351
1352         <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">
1353                 <fields oils_persist:primary="module">
1354                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1355                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359                         <actions>
1360                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1361                                 <retrieve/>
1362                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1363                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1364                         </actions>
1365                 </permacrud>
1366         </class>
1367
1368         <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">
1369                 <fields oils_persist:primary="module">
1370                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375                         <actions>
1376                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1377                                 <retrieve/>
1378                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1379                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <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">
1385                 <fields oils_persist:primary="module">
1386                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1387                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391                         <actions>
1392                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1393                                 <retrieve/>
1394                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1395                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1396                         </actions>
1397                 </permacrud>
1398         </class>
1399
1400         <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">
1401                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1402                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1403                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1404                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1405                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1406                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1407                 </fields>
1408                 <links>
1409                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1410                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1411                 </links>
1412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1413                         <actions>
1414                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </create>
1417                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </retrieve>
1420                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </update>
1423                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1424                     <context link="event_def" field="owner"/>
1425                 </delete>
1426                         </actions>
1427                 </permacrud>
1428         </class>
1429
1430         <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">
1431                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1432                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1433                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1434                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1435                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1436                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1437                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1438                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1439                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1440                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1441                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1442                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1443                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1444                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1445                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1446                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1447                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1448                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1449                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1450                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1451                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1452                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1453                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1454                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1455                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1456                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1457                         <field reporter:label="Context User Path" name="context_usr_path" reporter:datatype="text"/>
1458                         <field reporter:label="Context Library Path" name="context_library_path" reporter:datatype="text"/>
1459                         <field reporter:label="Context Bib Path" name="context_bib_path" reporter:datatype="text"/>
1460                         <field reporter:label="Context Item Path" name="context_item_path" reporter:datatype="text"/>
1461                 </fields>
1462                 <links>
1463                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1464                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1465                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1466                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1467                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1468                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1469                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1470                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1471                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1472                 </links>
1473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1474                         <actions>
1475                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1476                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1477                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1479                         </actions>
1480                 </permacrud>
1481         </class>
1482
1483         <class id="atevdefg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_def_group" oils_persist:tablename="action_trigger.event_def_group" reporter:label="Trigger Event Definition Group" oils_persist:restrict_primary="100">
1484                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_id_seq">
1485                         <field reporter:label="Group ID" name="id" reporter:datatype="id"/>
1486                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1487                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1488                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1489                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1490                         <field reporter:label="Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
1491                 </fields>
1492                 <links>
1493                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1494                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1495                         <link field="members" reltype="has_many" key="grp" map="" class="atevdefgm"/>
1496                 </links>
1497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1498                         <actions>
1499                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1500                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1501                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1502                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1503                         </actions>
1504                 </permacrud>
1505         </class>
1506
1507         <class id="atevdefgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_def_group_member" oils_persist:tablename="action_trigger.event_def_group_member" reporter:label="Trigger Event Definition Group Member">
1508                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_member_id_seq">
1509                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1510                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1511                         <field reporter:label="Group" name="grp"  reporter:datatype="link"/>
1512                         <field reporter:label="Event Definition" name="event_def"  reporter:datatype="link"/>
1513                         <field reporter:label="Sortable" name="sortable" reporter:datatype="bool"/>
1514                         <field reporter:label="Include Holdings" name="holdings" reporter:datatype="bool"/>
1515                         <field reporter:label="Externally Processed" name="external" reporter:datatype="bool"/>
1516                 </fields>
1517                 <links>
1518                         <link field="grp" reltype="has_a" key="id" map="" class="atevdefg"/>
1519                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1520                 </links>
1521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1522                         <actions>
1523                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1524                     <context link="grp" field="owner"/>
1525                 </create>
1526                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1527                     <context link="grp" field="owner"/>
1528                 </retrieve>
1529                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1530                     <context link="grp" field="owner"/>
1531                 </update>
1532                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1533                     <context link="grp" field="owner"/>
1534                 </delete>
1535                         </actions>
1536                 </permacrud>
1537         </class>
1538
1539         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1540                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1541                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1542                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1543                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1544                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1545                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1546                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1547                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1548                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1549                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1550                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1551                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1552                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1553                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1554                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1555                         <field reporter:label="Context User" name="context_user" reporter:datatype="link"/>
1556                         <field reporter:label="Context Library" name="context_library" reporter:datatype="link"/>
1557                         <field reporter:label="Context Bib" name="context_bib" reporter:datatype="link"/>
1558                         <field reporter:label="Context Item" name="context_item" reporter:datatype="link"/>
1559                 </fields>
1560                 <links>
1561                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1562                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1563                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1564                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1565                         <link field="context_user" reltype="has_a" key="id" map="" class="au"/>
1566                         <link field="context_library" reltype="has_a" key="id" map="" class="aou"/>
1567                         <link field="context_bib" reltype="has_a" key="id" map="" class="bre"/>
1568                         <link field="context_item" reltype="has_a" key="id" map="" class="acp"/>
1569                 </links>
1570         </class>
1571
1572         <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">
1573                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1574                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1575                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1576                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1577                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1578                 </fields>
1579                 <links>
1580                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1581                 </links>
1582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1583                         <actions>
1584                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1585                     <context link="event_def" field="owner"/>
1586                 </create>
1587                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1588                     <context link="event_def" field="owner"/>
1589                 </retrieve>
1590                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1591                     <context link="event_def" field="owner"/>
1592                 </update>
1593                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1594                     <context link="event_def" field="owner"/>
1595                 </delete>
1596                         </actions>
1597                 </permacrud>
1598         </class>
1599
1600         <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">
1601                 <oils_persist:source_definition><![CDATA[
1602                 SELECT  atevdef.hook,
1603                         atevdef.name,
1604                         atevdef.reactor,
1605                         atev.id,
1606                         atev.event_def,
1607                         atev.add_time,
1608                         atev.run_time,
1609                         atev.start_time,
1610                         atev.update_time,
1611                         atev.complete_time,
1612                         atev.update_process,
1613                         atev.state,
1614                         atev.user_data,
1615                         atev.template_output,
1616                         atev.error_output,
1617                         atev.async_output,
1618                         targ_circ.id AS target_circ,
1619                         targ_ahr.id AS target_hold,
1620                         COALESCE(
1621                                 targ_circ.circ_lib,
1622                                 targ_ahr.pickup_lib
1623                         ) AS perm_lib
1624                 FROM action_trigger.event atev
1625                 JOIN action_trigger.event_definition atevdef ON
1626                         (atevdef.id = atev.event_def)
1627                 JOIN action_trigger.hook ath ON
1628                         (ath.key = atevdef.hook)
1629                 LEFT JOIN action.circulation targ_circ ON
1630                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1631                 LEFT JOIN action.hold_request targ_ahr ON
1632                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1633                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1634                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1635                                 'circ.staff.max_visible_event_age',
1636                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1637                         ) UNION
1638                         SELECT '1000 YEARS'::INTERVAL AS value
1639                 ) ous)
1640                 ]]></oils_persist:source_definition>
1641                 <fields oils_persist:primary="id">
1642                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1643                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1644                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1645                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1646                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1647                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1648                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1649                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1650                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1651                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1652                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1653                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1654                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1655                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1656                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1657                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1658                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1659                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1660                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1661                 </fields>
1662                 <links>
1663                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1664                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1665                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1666                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1667                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1668                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1669                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1670                 </links>
1671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1672                         <actions>
1673                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1674                         </actions>
1675                 </permacrud>
1676         </class>
1677
1678         <class id="atoul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::optimized_user_log" reporter:label="Action Trigger Optimized User Log" oils_persist:readonly="true">
1679                 <oils_persist:source_definition><![CDATA[
1680                 SELECT  atevdef.hook,
1681                         atevdef.name,
1682                         atevdef.reactor,
1683                         atev.id,
1684                         atev.event_def,
1685                         atev.add_time,
1686                         atev.run_time,
1687                         atev.start_time,
1688                         atev.update_time,
1689                         atev.complete_time,
1690                         atev.update_process,
1691                         atev.state,
1692                         atev.user_data,
1693                         atev.template_output,
1694                         atev.error_output,
1695                         atev.async_output,
1696             atev.target,
1697                         CASE WHEN ath.core_type = 'circ' THEN atev.target END AS target_circ,
1698                         CASE WHEN ath.core_type = 'ahr' THEN atev.target END AS target_hold,
1699             atev.context_user,
1700                         atev.context_library,
1701             atev.context_bib,
1702             atev.context_item,
1703             rssr.title,
1704             rssr.author
1705                 FROM action_trigger.event atev
1706                 JOIN action_trigger.event_definition atevdef ON
1707                         (atevdef.id = atev.event_def)
1708                 JOIN action_trigger.hook ath ON
1709                         (ath.key = atevdef.hook AND ath.core_type IN ('circ','ahr'))
1710         LEFT JOIN reporter.super_simple_record rssr ON
1711             (atev.context_bib = rssr.id)
1712                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1713                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1714                                 'circ.staff.max_visible_event_age',
1715                                 atev.context_library
1716                         ) UNION
1717                         SELECT '1000 YEARS'::INTERVAL AS value
1718                 ) ous)
1719                 ]]></oils_persist:source_definition>
1720                 <fields oils_persist:primary="id">
1721                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1722                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1723                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1724                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1725                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1726                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1727                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1728                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1729                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1730                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1731                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1732                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1733                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1734                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1735                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1736                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1737                         <field reporter:label="Event Target Object ID" name="target" reporter:datatype="link" />
1738                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1739                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1740                         <field reporter:label="Context User" name="context_user" reporter:datatype="link" />
1741                         <field reporter:label="Context Library" name="context_library" reporter:datatype="org_unit" />
1742                         <field reporter:label="Context Bib" name="context_bib" reporter:datatype="link" />
1743                         <field reporter:label="Context Item" name="context_item" reporter:datatype="link" />
1744                         <field reporter:label="Title" name="title" reporter:datatype="text" />
1745                         <field reporter:label="Author" name="author" reporter:datatype="text" />
1746                 </fields>
1747                 <links>
1748                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1749                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1750                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1751                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1752                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1753                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1754                         <link field="context_user" reltype="has_a" key="id" map="" class="au" />
1755                         <link field="context_library" reltype="has_a" key="id" map="" class="aou" />
1756                         <link field="context_bib" reltype="has_a" key="id" map="" class="bre" />
1757                         <link field="context_item" reltype="has_a" key="id" map="" class="acp" />
1758                 </links>
1759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1760                         <actions>
1761                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="context_library" />
1762                         </actions>
1763                 </permacrud>
1764         </class>
1765
1766         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1767                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1768                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1769                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1770                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1771                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1772                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1773                 </fields>
1774                 <links>
1775                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1776                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1777                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1778                 </links>
1779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1780                         <actions>
1781                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1782                         </actions>
1783                 </permacrud>
1784         </class>
1785
1786         <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">
1787                 <fields oils_persist:primary="code">
1788                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1789                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1790                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1791                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1792                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1793                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1794                 </fields>
1795                 <links/>
1796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1797             <actions>
1798                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1799                 <retrieve/>
1800                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1801                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1802             </actions>
1803         </permacrud>
1804         </class>
1805
1806         <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">
1807                 <fields oils_persist:primary="code">
1808                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1809                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1810                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1811                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1812                 </fields>
1813                 <links/>
1814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1815             <actions>
1816                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1817                 <retrieve/>
1818                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1819                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1820             </actions>
1821         </permacrud>
1822         </class>
1823
1824         <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">
1825                 <fields oils_persist:primary="code">
1826                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1827                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1828                 </fields>
1829                 <links/>
1830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1831             <actions>
1832                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1833                 <retrieve/>
1834                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1835                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1836             </actions>
1837         </permacrud>
1838         </class>
1839
1840         <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">
1841                 <fields oils_persist:primary="code">
1842                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1843                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1844                 </fields>
1845                 <links/>
1846         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1847             <actions>
1848                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1849                 <retrieve/>
1850                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1851                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1852             </actions>
1853         </permacrud>
1854         </class>
1855
1856         <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">
1857                 <fields oils_persist:primary="code">
1858                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1859                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1860                 </fields>
1861                 <links/>
1862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1863             <actions>
1864                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1865                 <retrieve/>
1866                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1867                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1868             </actions>
1869         </permacrud>
1870         </class>
1871
1872         <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">
1873                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1874                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1875                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1876                 </fields>
1877                 <links/>
1878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1879             <actions>
1880                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1881                 <retrieve/>
1882                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1883                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1884             </actions>
1885         </permacrud>
1886         </class>
1887
1888         <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">
1889                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1890                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1891                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1892                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1893                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1894                 </fields>
1895         <links>
1896             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1897             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1898             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1899         </links>
1900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1901             <actions>
1902                 <create permission="UPDATE_COPY">
1903                     <context link="target_copy" field="circ_lib"/>
1904                 </create>
1905                 <retrieve/>
1906                 <update permission="UPDATE_COPY">
1907                     <context link="target_copy" field="circ_lib"/>
1908                 </update>
1909                 <delete permission="UPDATE_COPY">
1910                     <context link="target_copy" field="circ_lib"/>
1911                 </delete>
1912             </actions>
1913         </permacrud>
1914         </class>
1915
1916         <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">
1917                 <fields oils_persist:primary="code">
1918                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1919                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1920                 </fields>
1921                 <links/>
1922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1923             <actions>
1924                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1925                 <retrieve/>
1926                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1927                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1928             </actions>
1929         </permacrud>
1930         </class>
1931
1932         <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">
1933                 <fields oils_persist:primary="code">
1934                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1935                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1936                 </fields>
1937                 <links/>
1938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1939             <actions>
1940                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1941                 <retrieve/>
1942                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1943                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1944             </actions>
1945         </permacrud>
1946         </class>
1947
1948         <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">
1949                 <fields oils_persist:primary="code">
1950                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1951                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1952                 </fields>
1953                 <links/>
1954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1955             <actions>
1956                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1957                 <retrieve/>
1958                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1959                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1960             </actions>
1961         </permacrud>
1962         </class>
1963
1964     <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">
1965         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1966             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1967             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1968             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1969             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1970             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1971             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1972             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1973             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1974             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1975             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1976             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1977             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1978             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1979             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1980             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1981             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1982             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1983         </fields>
1984         <links/>
1985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1986             <actions>
1987                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1988                 <retrieve/>
1989                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1990                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1991             </actions>
1992         </permacrud>
1993     </class>
1994
1995     <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">
1996         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1997             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1998             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1999             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
2000             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
2001             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
2002             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
2003             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
2004             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
2005             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
2006             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
2007             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
2008             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
2009             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
2010             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
2011             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
2012             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
2013             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
2014             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
2015             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
2016         </fields>
2017         <links/>
2018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2019             <actions>
2020                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2021                 <retrieve/>
2022                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2023                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2024             </actions>
2025         </permacrud>
2026     </class>
2027
2028     <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">
2029         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
2030             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
2031             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2032             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
2033             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
2034             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
2035         </fields>
2036         <links>
2037             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2038             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
2039             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
2040         </links>
2041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2042             <actions>
2043                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2044                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2046                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2047             </actions>
2048         </permacrud>
2049     </class>
2050
2051         <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">
2052                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
2053                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2054                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2055                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
2056                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
2057                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
2058                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
2059                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
2060                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
2061                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
2062                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
2063                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2064                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2065                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2066                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2067                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2068                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2069             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2070                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
2071                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
2072                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
2073                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
2074                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
2075                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
2076                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2077                 </fields>
2078                 <links>
2079                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2080                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
2081                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
2082                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
2083                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
2084                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
2085                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
2086                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2087                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2088                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2089                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2090                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2091                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
2092             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
2093                 </links>
2094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2095             <actions>
2096                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2097                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2098                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2099                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2100             </actions>
2101         </permacrud>
2102         </class>
2103
2104         <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">
2105                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
2106                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2107                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
2108                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2109                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
2110                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
2111                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
2112                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
2113                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
2114                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2115                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
2116                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2117                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2118                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2119                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2120                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2121             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
2122                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
2123                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
2124             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2125                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
2126                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
2127                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2128                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2129             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2130             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
2131             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
2132                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
2133                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
2134                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
2135                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2136                 </fields>
2137                 <links>
2138                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2139                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2140                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2141                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2142                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2143                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2144                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2145                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2146                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2147                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2148                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2149                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
2150                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
2151                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
2152             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2153                 </links>
2154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2155             <actions>
2156                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2157                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2158                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2159                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2160             </actions>
2161         </permacrud>
2162         </class>
2163
2164     <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">
2165         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2166             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2167             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2168             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2169         </fields>
2170         <links/>
2171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172             <actions>
2173                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2174                 <retrieve/>
2175                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2176                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2177             </actions>
2178         </permacrud>
2179     </class>
2180
2181     <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">
2182         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2183             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2184             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2185             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2186             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2187             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2188             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2189             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2190         </fields>
2191         <links>
2192             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2193         </links>
2194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2195             <actions>
2196                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2197                 <retrieve/>
2198                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2199                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2200             </actions>
2201         </permacrud>
2202     </class>
2203
2204     <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">
2205         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2206             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2207             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2208             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2209             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2210             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2211         </fields>
2212         <links>
2213             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2214             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2215         </links>
2216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2217             <actions>
2218                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2219                     <context link="matchpoint" field="org_unit"/>
2220                 </create>
2221                 <retrieve/>
2222                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2223                     <context link="matchpoint" field="org_unit"/>
2224                 </update>
2225                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2226                     <context link="matchpoint" field="org_unit"/>
2227                 </delete>
2228             </actions>
2229         </permacrud>
2230     </class>
2231
2232     <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">
2233         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2234             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2235             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2236             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2237         </fields>
2238         <links>
2239             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2240             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2241         </links>
2242         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2243             <actions>
2244                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2245                     <context link="limit_set" field="owning_lib"/>
2246                 </create>
2247                 <retrieve/>
2248                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2249                     <context link="limit_set" field="owning_lib"/>
2250                 </update>
2251                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2252                     <context link="limit_set" field="owning_lib"/>
2253                 </delete>
2254             </actions>
2255         </permacrud>
2256     </class>
2257     <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">
2258         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2259             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2260             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2261             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2262         </fields>
2263         <links>
2264             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2265             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2266         </links>
2267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2268             <actions>
2269                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2270                     <context link="limit_set" field="owning_lib"/>
2271                 </create>
2272                 <retrieve/>
2273                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2274                     <context link="limit_set" field="owning_lib"/>
2275                 </update>
2276                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2277                     <context link="limit_set" field="owning_lib"/>
2278                 </delete>
2279             </actions>
2280         </permacrud>
2281     </class>
2282
2283     <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">
2284         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2285             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2286             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2287             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2288             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2289         </fields>
2290         <links>
2291             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2292             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2293         </links>
2294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2295             <actions>
2296                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2297                     <context link="limit_set" field="owning_lib"/>
2298                 </create>
2299                 <retrieve/>
2300                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2301                     <context link="limit_set" field="owning_lib"/>
2302                 </update>
2303                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2304                     <context link="limit_set" field="owning_lib"/>
2305                 </delete>
2306             </actions>
2307         </permacrud>
2308     </class>
2309
2310         <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">
2311                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2312                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2313                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2314                 </fields>
2315                 <links/>
2316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2317             <actions>
2318                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2319                 <retrieve/>
2320                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2321                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2322             </actions>
2323         </permacrud>
2324         </class>
2325
2326         <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">
2327                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2328                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2329                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2330                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2331                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2332                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2333                 </fields>
2334                 <links>
2335                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2336                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2337                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2338                 </links>
2339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2340             <actions>
2341                 <create permission="ADMIN_SURVEY">
2342                     <context link="survey" field="owner"/>
2343                 </create>
2344                 <retrieve/>
2345                 <update permission="ADMIN_SURVEY">
2346                     <context link="survey" field="owner"/>
2347                 </update>
2348                 <delete permission="ADMIN_SURVEY">
2349                     <context link="survey" field="owner"/>
2350                 </delete>
2351             </actions>
2352         </permacrud>
2353         </class>
2354         <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">
2355                 <fields oils_persist:primary="id" oils_persist:sequence="">
2356                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2357                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2358                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2359                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2360                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2361                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2362                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2363                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2364                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2365                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2366                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2367                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2368                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2369                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2370                 </fields>
2371                 <links>
2372                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2373                 </links>
2374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2375                         <actions>
2376                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2377                                         <context link="usr" field="home_ou" />
2378                                 </retrieve>
2379                         </actions>
2380                 </permacrud>
2381         </class>
2382         <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">
2383                 <fields oils_persist:primary="id" oils_persist:sequence="">
2384                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2385                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2386                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2387                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2388                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2389                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2390                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2392                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2393                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2394                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2395                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2396                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2397                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2398                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2399                 </fields>
2400                 <links>
2401                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2402                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2403                 </links>
2404         </class>
2405         <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">
2406                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2407                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2408                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2409                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2410                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2411                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2412                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2413                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2414                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2415                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2416                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2417                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2418                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2419                 </fields>
2420                 <links>
2421                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2422                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2423                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2424                 </links>
2425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2426                         <actions> <!-- created magically, so no create action -->
2427                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2428                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2429                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2430                         </actions>
2431                 </permacrud>
2432         </class>
2433         <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)">
2434                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2435                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2436                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2437                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2438                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2439                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2440                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2441                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2442                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2443                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2444                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2445                         <field reporter:label="Editor" name="usr" reporter:datatype="link" />
2446                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2447                 </fields>
2448                 <links>
2449                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2450                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2451                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2452                 </links>
2453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2454                         <actions> <!-- created magically, so no create action -->
2455                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2456                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2457                         </actions>
2458                 </permacrud>
2459         </class>
2460         <class id="aump" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_penalty" oils_persist:tablename="actor.usr_message_penalty" reporter:label="User Message Penalty">
2461         <fields oils_persist:primary="id">
2462                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2463                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2464                         <field reporter:label="Debug: Set Date (Penalty)" name="ausp_set_date" reporter:datatype="timestamp"/>
2465                         <field reporter:label="Debug: Creation Date/Time (Message)" name="aum_create_date" reporter:datatype="timestamp"/>
2466                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2467                         <field reporter:label="Creating Library" name="org_unit" reporter:datatype="link"/>
2468                         <field reporter:label="Debug: Creating Library (Penalty)" name="ausp_org_unit" reporter:datatype="link"/>
2469                         <field reporter:label="Debug: Creating Library (Message)" name="aum_sending_lib" reporter:datatype="link"/>
2470                         <field reporter:label="Debug: Penalty ID" name="ausp_id" reporter:datatype="id" />
2471                         <field reporter:label="Debug: Message ID" name="aum_id" reporter:datatype="id" />
2472                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2473                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2474                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2475                         <field reporter:label="Debug: User (Penalty)" name="ausp_usr" reporter:datatype="link" />
2476                         <field reporter:label="Debug: User (Message)" name="aum_usr" reporter:datatype="link" />
2477                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2478                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2479                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2480                         <field reporter:label="Debug: Stop Date/Time (Penalty)" name="ausp_stop_date" reporter:datatype="timestamp"/>
2481                         <field reporter:label="Debug: Stop Date/Time (Message)" name="aum_stop_date" reporter:datatype="timestamp"/>
2482                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2483                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2484                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2485                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2486                         <field name="ausp_usr_message" reporter:datatype="link" reporter:label="Debug: User Message (Penalty)"/>
2487                 </fields>
2488                 <links>
2489                         <link field="ausp_id" reltype="has_a" key="id" map="" class="ausp"/>
2490                         <link field="aum_id" reltype="has_a" key="id" map="" class="aum"/>
2491                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2492                         <link field="ausp_usr" reltype="has_a" key="id" map="" class="au"/>
2493                         <link field="aum_usr" reltype="has_a" key="id" map="" class="au"/>
2494                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2495                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2496                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2497                         <link field="aum_sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2498                         <link field="ausp_org_unit" reltype="has_a" key="id" map="" class="aou"/>
2499                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2500                         <link field="ausp_usr_message" reltype="has_a" key="id" map="" class="aum"/>
2501                 </links>
2502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2503                         <actions> <!-- created magically, so no create action -->
2504                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2505                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2506                         </actions>
2507                 </permacrud>
2508         </class>
2509
2510         <class id="aupw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_privacy_waiver" oils_persist:tablename="actor.usr_privacy_waiver" reporter:label="Privacy Waiver">
2511                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2512                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2513                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2514                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2515                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2516                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2517                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2518                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2519                 </fields>
2520                 <links>
2521                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2522                 </links>
2523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524                         <actions>
2525                                 <create permission="UPDATE_USER">
2526                                         <context link="usr" field="home_ou"/>
2527                                 </create>
2528                                 <retrieve permission="VIEW_USER">
2529                                         <context link="usr" field="home_ou"/>
2530                                 </retrieve>
2531                                 <update permission="UPDATE_USER">
2532                                         <context link="usr" field="home_ou"/>
2533                                 </update>
2534                                 <delete permission="UPDATE_USER">
2535                                         <context link="usr" field="home_ou"/>
2536                                 </delete>
2537                         </actions>
2538                 </permacrud>
2539         </class>
2540         <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">
2541                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2542                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2543                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2544                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2545                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2546                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2547                 </fields>
2548                 <links>
2549                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2550                 </links>
2551         </class>
2552         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2553                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2554                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2555                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2556                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2557                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2558                 </fields>
2559                 <links>
2560                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2561                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2562                 </links>
2563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2564                         <actions>
2565                                 <retrieve permission="VIEW_USER">
2566                                         <context link="usr" field="home_ou" />
2567                                 </retrieve>
2568                         </actions>
2569                 </permacrud>
2570         </class>
2571         <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">
2572                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2573                         <field name="field" reporter:datatype="link"/>
2574                         <field name="id" reporter:datatype="id" />
2575                         <field name="source" reporter:datatype="link"/>
2576                         <field name="value" reporter:datatype="text"/>
2577                 </fields>
2578                 <links>
2579                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2580                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2581                 </links>
2582         </class>
2583         <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">
2584                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2585                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2586                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2587                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2588                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2589                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2590                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2591                 </fields>
2592                 <links>
2593                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2594                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2595                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2596                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2597                 </links>
2598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2599                         <actions>
2600                                 <retrieve/>
2601                         </actions>
2602                 </permacrud>
2603         </class>
2604         <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">
2605                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2606                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2607                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2608                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2609                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2610                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2611                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2612                 </fields>
2613                 <links>
2614                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2615                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2616                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2617                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2618                 </links>
2619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2620                         <actions>
2621                                 <retrieve/>
2622                         </actions>
2623                 </permacrud>
2624         </class>
2625         <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">
2626                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2627                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2628                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2629                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2630                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2631                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2632                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2633                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2634                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2635                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2636                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2637                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2638                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2639                 </fields>
2640                 <links>
2641                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2642                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2643                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2644                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2645                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2646                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2647                 </links>
2648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649             <actions>
2650                 <create permission="TRANSIT_COPY" context_field="owner">
2651                     <context link="target_copy" field="circ_lib"/>
2652                 </create>
2653                 <retrieve/>
2654                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2655                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2656             </actions>
2657         </permacrud>
2658         </class>
2659         <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">
2660                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2661                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2662                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2663                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2664                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2665                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2666                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2667                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2668                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2669                 </fields>
2670                 <links>
2671                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2672                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2673                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2674                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2675                 </links>
2676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2677             <actions>
2678                 <create permission="ADMIN_SURVEY">
2679                     <context link="survey" field="owner"/>
2680                 </create>
2681                 <retrieve permission="VIEW_USER">
2682                     <context link="usr" field="home_ou"/>
2683                 </retrieve>
2684                 <update permission="ADMIN_SURVEY">
2685                     <context link="survey" field="owner"/>
2686                 </update>
2687                 <delete permission="ADMIN_SURVEY">
2688                     <context link="survey" field="owner"/>
2689                 </delete>
2690             </actions>
2691         </permacrud>
2692         </class>
2693         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2694                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2695                         <field name="bucket" />
2696                         <field name="id" reporter:datatype="id" />
2697                         <field name="target_copy" reporter:datatype="link"/>
2698                         <field name="create_time" reporter:datatype="timestamp" />
2699                         <field name="pos" reporter:datatype="int" />
2700                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2701                 </fields>
2702                 <links>
2703                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2704                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2705             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2706                 </links>
2707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2708                         <actions>
2709                                 <retrieve permission="ADMIN_COPY_BUCKET">
2710                     <context link="bucket" owning_lib="owning_lib"/>
2711                 </retrieve>
2712             </actions>
2713         </permacrud>
2714         </class>
2715         <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">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2717                         <field name="id" reporter:datatype="id" />
2718                         <field name="item" reporter:datatype="link"/>
2719                         <field name="note" reporter:datatype="text" />
2720                 </fields>
2721                 <links>
2722                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2723                 </links>
2724         </class>
2725
2726         <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">
2727                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2728                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2729                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2730                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2731                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2732                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2733                 </fields>
2734                 <links>
2735                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2736                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2737                 </links>
2738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2739                         <actions>
2740                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2741                                 <retrieve/>
2742                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2743                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2744                         </actions>
2745                 </permacrud>
2746         </class>
2747
2748         <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">
2749                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2750                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2751                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2752                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2753                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2754                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2755                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2756                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2757                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2758                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2759                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2760                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2761                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2762                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2763                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2764                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2765                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2766                 </fields>
2767                 <links>
2768                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2769                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2770                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2771                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2772                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2773                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2774                         <link field="heading_field" reltype="has_a" key="id" map="" class="ahf"/>
2775                 </links>
2776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2777                         <actions>
2778                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2779                                 <retrieve/>
2780                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2781                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2782                         </actions>
2783                 </permacrud>
2784         </class>
2785
2786         <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">
2787                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2788                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2789                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2790                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2791                 </fields>
2792                 <links>
2793                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2794                 </links>
2795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2796                         <actions>
2797                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2798                                 <retrieve/>
2799                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2800                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2801                         </actions>
2802                 </permacrud>
2803         </class>
2804
2805         <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">
2806                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2807                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2808                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2809                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2810                 </fields>
2811                 <links>
2812                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2813                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2814                 </links>
2815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2816                         <actions>
2817                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2818                                 <retrieve/>
2819                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2820                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2821                         </actions>
2822                 </permacrud>
2823         </class>
2824
2825         <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">
2826                 <fields oils_persist:primary="code">
2827                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2828                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2829                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2830                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2831                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2832                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2833                 </fields>
2834                 <links>
2835                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2836                 </links>
2837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2838                         <actions>
2839                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2840                                 <retrieve/>
2841                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2842                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2843                         </actions>
2844                 </permacrud>
2845         </class>
2846
2847         <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">
2848                 <fields oils_persist:primary="code">
2849                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2850                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2851                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2852                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2853                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2854                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2855                 </fields>
2856                 <links>
2857                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2858                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2859                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2860                 </links>
2861                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2862                         <actions>
2863                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2864                                 <retrieve/>
2865                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2866                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2867                         </actions>
2868                 </permacrud>
2869         </class>
2870
2871     <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">
2872         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2873             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2874             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2875             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2876         </fields>
2877         <links>
2878             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2879             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2880         </links>
2881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2882             <actions>
2883                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2884                 <retrieve/>
2885                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2886                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2887             </actions>
2888         </permacrud>
2889     </class>
2890
2891         <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">
2892                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2893                         <field name="active" reporter:datatype="bool"/>
2894                         <field name="create_date" reporter:datatype="timestamp"/>
2895                         <field name="creator" />
2896                         <field name="deleted" reporter:datatype="bool"/>
2897                         <field name="edit_date" reporter:datatype="timestamp"/>
2898                         <field name="editor" />
2899                         <field name="id" reporter:datatype="id" />
2900                         <field name="last_xact_id" />
2901                         <field name="marc" />
2902                         <field name="source" />
2903                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2904                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2905                         <field name="heading" />
2906                         <field name="simple_heading" />
2907                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2908                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2909                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2910                 </fields>
2911                 <links>
2912                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2914                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2915                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2916                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2917                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2918                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2919                 </links>
2920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2921                         <actions>
2922                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2923                                 <retrieve/>
2924                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2925                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2926                         </actions>
2927                 </permacrud>
2928         </class>
2929         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2930                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2931                         <field name="char_encoding" />
2932                         <field name="id" />
2933                         <field name="record" />
2934                         <field name="record_status" />
2935                         <field name="thesaurus" />
2936                 </fields>
2937                 <links>
2938                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2939                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2940                 </links>
2941         </class>
2942         <class id="abl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2943                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2944                         <field name="id" reporter:datatype="id" />
2945                         <field name="bib" reporter:datatype="link" />
2946                         <field name="authority" reporter:datatype="link" />
2947                 </fields>
2948                 <links>
2949                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2950                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2951                 </links>
2952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2953                         <actions>
2954                                 <retrieve/>
2955                         </actions>
2956                 </permacrud>
2957         </class>
2958         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2959                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2960                         <field name="id" reporter:datatype="id" />
2961                         <field name="record" reporter:datatype="link" />
2962                         <field name="atag" reporter:datatype="link" />
2963                         <field name="value" reporter:datatype="text" />
2964                         <field name="thesaurus" reporter:datatype="text" />
2965                 </fields>
2966                 <links>
2967                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2968                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2969                 </links>
2970         </class>
2971
2972         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2973                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2974                         <field name="id" reporter:datatype="id" reporter:selector="label" />
2975                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2976                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2977                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2978                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2979                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2980                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2981                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2982                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2983                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2984                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2985                 </fields>
2986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987                         <actions>
2988                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2989                                 <retrieve/>
2990                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2991                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2992                         </actions>
2993                 </permacrud>
2994         </class>
2995
2996         <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">
2997                 <fields oils_persist:primary="code" oils_persist:sequence="">
2998                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2999                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3000                 </fields>
3001                 <links/>
3002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3003             <actions>
3004                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3005                 <retrieve/>
3006                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3007                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3008             </actions>
3009         </permacrud>
3010         </class>
3011         <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">
3012                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3013                         <field name="accepting_usr" />
3014                         <field name="amount" reporter:datatype="money" />
3015                         <field name="amount_collected" reporter:datatype="money" />
3016                         <field name="approval_code" reporter:datatype="text"/>
3017                         <field name="cash_drawer" reporter:datatype="link"/>
3018                         <field name="cc_number" reporter:datatype="text"/>
3019                         <field name="cc_order_number" reporter:datatype="text"/>
3020                         <field name="cc_processor" reporter:datatype="text"/>
3021                         <field name="id" reporter:datatype="id" />
3022                         <field name="note" reporter:datatype="text"/>
3023                         <field name="payment_ts" reporter:datatype="timestamp"/>
3024                         <field name="xact" reporter:datatype="link"/>
3025                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3026                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3027                 </fields>
3028                 <links>
3029                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3030                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3031                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3032                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3033                 </links>
3034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3035             <actions>
3036                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3037                     <context link="xact" jump="usr" field="home_ou"/>
3038                 </retrieve>
3039                         </actions>
3040                 </permacrud>
3041         </class>
3042         <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" oils_persist:field_safe="true">
3043                 <fields oils_persist:primary="name">
3044                         <field reporter:label="Name" name="name" reporter:datatype="text" />
3045                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
3046                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
3047                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
3048                 </fields>
3049                 <links/>
3050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3051             <actions>
3052                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
3053                 <retrieve/>
3054                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
3055                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
3056             </actions>
3057         </permacrud>
3058         </class>
3059
3060         <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">
3061                 <fields oils_persist:primary="alias">
3062                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
3063                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
3064                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
3065                 </fields>
3066                 <links>
3067                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3068                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3069                 </links>
3070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071             <actions>
3072                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
3073                 <retrieve/>
3074                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
3075                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
3076             </actions>
3077         </permacrud>
3078         </class>
3079
3080         <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">
3081                 <fields oils_persist:primary="name">
3082                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
3083                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3084                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
3085                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3086                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
3087                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
3088                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
3089                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
3090                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
3091                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
3092                 </fields>
3093                 <links>
3094                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
3095                 </links>
3096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3097             <actions>
3098                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
3099                 <retrieve/>
3100                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
3101                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
3102             </actions>
3103         </permacrud>
3104         </class>
3105
3106         <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">
3107                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
3108                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
3109                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
3110                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3111                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3112                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
3113                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
3114                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
3115                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
3116                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
3117                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
3118                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
3119                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
3120                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
3121                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
3122                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
3123                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
3124                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
3125                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3126                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
3127                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
3128                 </fields>
3129                 <links>
3130                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
3131                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3132                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
3133                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
3134                 </links>
3135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3136             <actions>
3137                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3138                 <retrieve/>
3139                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3140                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3141             </actions>
3142         </permacrud>
3143         </class>
3144
3145         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
3146                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
3147                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3148                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
3149                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
3150                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
3151                 </fields>
3152                 <links>
3153                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
3154                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
3155                 </links>
3156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3157             <actions>
3158                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3159                 <retrieve/>
3160                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3161                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3162             </actions>
3163         </permacrud>
3164         </class>
3165
3166         <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">
3167                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
3168                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
3169                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3170                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
3171                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
3172                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
3173                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
3174                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
3175                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
3176                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
3177                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
3178                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
3179                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
3180                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
3181                 </fields>
3182                 <links>
3183                 </links>
3184                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3185                         <actions>
3186                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3187                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3188                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3189                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3190                         </actions>
3191                 </permacrud>
3192         </class>
3193         <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">
3194                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3195                         <field name="id" reporter:datatype="id" />
3196                         <field name="name" reporter:datatype="text"/>
3197                         <field name="xpath" reporter:datatype="text"/>
3198                         <field name="format" reporter:datatype="link"/>
3199                         <field name="first_word" reporter:datatype="bool" />
3200                 </fields>
3201                 <links/>
3202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3203             <actions>
3204                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3205                 <retrieve/>
3206                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3207                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3208             </actions>
3209         </permacrud>
3210         </class>
3211         <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">
3212                 <fields oils_persist:primary="code" oils_persist:sequence="">
3213                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3214                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3215                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3216                 </fields>
3217                 <links/>
3218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3219             <actions>
3220                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3221                 <retrieve/>
3222                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3223                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3224             </actions>
3225         </permacrud>
3226         </class>
3227         <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">
3228                 <fields oils_persist:primary="code" oils_persist:sequence="">
3229                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3230                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3231                 </fields>
3232                 <links/>
3233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3234             <actions>
3235                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3236                 <retrieve/>
3237                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3238                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3239             </actions>
3240         </permacrud>
3241         </class>
3242     <class id="acmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course" oils_persist:tablename="asset.course_module_course" reporter:label="Course">
3243         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_id_seq">
3244             <field reporter:label="ID" name="id" reporter:datatype="id" />
3245             <field reporter:label="Course Name" name="name" reporter:datatype="text" oils_obj:required="true" />
3246             <field reporter:label="Course Number" name="course_number" reporter:datatype="text" oils_obj:required="true" />
3247             <field reporter:label="Section Number" name="section_number" reporter:datatype="text" />
3248             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3249             <field reporter:label="Course Members" name="members" oils_persist:virtual="true" reporter:datatype="link" />
3250             <field reporter:label="Course Materials" name="materials" oils_persist:virtual="true" reporter:datatype="link" />
3251             <field reporter:label="Is Archived?" name="is_archived" reporter:datatype="bool" />
3252                         <field reporter:label="Terms Taught" name="terms_map" oils_persist:virtual="true" reporter:datatype="link" config_field="true" />
3253         </fields>
3254         <links>
3255             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3256             <link field="members" reltype="has_many" key="course" map="" class="acmcu" />
3257             <link field="materials" reltype="has_many" key="course" map="" class="acmcm" />
3258                         <link field="terms_map" reltype="has_many" key="course" map="" class="acmtcm" />
3259         </links>
3260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3261             <actions>
3262                 <create permission="MANAGE_RESERVES" context_field="owning_lib"/>
3263                 <retrieve/>
3264                 <update permission="MANAGE_RESERVES" context_field="owning_lib"/>
3265                 <delete permission="MANAGE_RESERVES" context_field="owning_lib"/>
3266             </actions>
3267         </permacrud>
3268     </class>
3269     <class id="acmcu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course_users" oils_persist:tablename="asset.course_module_course_users" reporter:label="Course Users">
3270         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_users_id_seq">
3271             <field reporter:label="ID" name="id" reporter:datatype="id" />
3272             <field reporter:label="Course" name="course" reporter:datatype="link" />
3273             <field reporter:label="User" name="usr" reporter:datatype="link" />
3274             <field reporter:label="User Role" name="usr_role" reporter:datatype="link" />
3275         </fields>
3276         <links>
3277             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3278             <link field="usr" reltype="has_a" key="id" map="" class="au" />
3279             <link field="usr_role" reltype="has_a" key="id" map="" class="acmr" />
3280         </links>
3281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3282             <actions>
3283                 <create permission="MANAGE_RESERVES">
3284                                         <context link="course" field="owning_lib" />
3285                 </create>
3286                 <retrieve/>
3287                 <update permission="MANAGE_RESERVES">
3288                                         <context link="course" field="owning_lib" />
3289                 </update>
3290                 <delete permission="MANAGE_RESERVES">
3291                                         <context link="course" field="owning_lib" />
3292                 </delete>
3293             </actions>
3294         </permacrud>
3295     </class>
3296     <class id="acmcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course_materials" oils_persist:tablename="asset.course_module_course_materials" reporter:label="Course Materials" oils_persist:field_safe="true">
3297         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_materials_id_seq">
3298             <field reporter:label="ID" name="id" reporter:datatype="id" />
3299             <field reporter:label="Course" name="course" reporter:datatype="link" />
3300             <field reporter:label="Item" name="item" reporter:datatype="link" />
3301             <field reporter:label="Record" name="record" reporter:datatype="link" />
3302             <field reporter:label="Record is temporary?" name="temporary_record" reporter:datatype="bool" />
3303             <field reporter:label="Item Relationship" name="relationship" reporter:datatype="text" />
3304             <field reporter:label="Original Status" name="original_status" reporter:datatype="link" />
3305             <field reporter:label="Original Circ Modifier" name="original_circ_modifier" reporter:datatype="link" />
3306             <field reporter:label="Original Shelving Location" name="original_location" reporter:datatype="link" />
3307             <field reporter:label="Original Callnumber" name="original_callnumber" reporter:datatype="link" />
3308         </fields>
3309         <links>
3310             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3311             <link field="item" reltype="has_a" key="id" map="" class="acp" />
3312             <link field="record" reltype="has_a" key="id" map="" class="bre" />
3313             <link field="original_callnumber" reltype="has_a" key="id" map="" class="acn" />
3314             <link field="original_status" reltype="has_a" key="id" map="" class="ccs" />
3315             <link field="original_circ_modifier" reltype="has_a" key="code" map="" class="ccm" />
3316             <link field="original_location" reltype="has_a" key="id" map="" class="acpl" />
3317         </links>
3318         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3319             <actions>
3320                 <create permission="MANAGE_RESERVES">
3321                                         <context link="course" field="owning_lib" />
3322                 </create>
3323                 <retrieve/>
3324                 <update permission="MANAGE_RESERVES">
3325                                         <context link="course" field="owning_lib" />
3326                 </update>
3327                 <delete permission="MANAGE_RESERVES">
3328                                         <context link="course" field="owning_lib" />
3329                 </delete>
3330             </actions>
3331         </permacrud>
3332     </class>
3333         <class id="acmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_term" oils_persist:tablename="asset.course_module_term" reporter:label="Term" oils_persist:field_safe="true">
3334                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_id_seq">
3335                         <field reporter:label="Term ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3336                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3337             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3338                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3339                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3340                         <field reporter:label="Courses" name="courses" reporter:datatype="link" oils_persist:virtual="true"/>
3341                         <field reporter:label="Course Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
3342                 </fields>
3343                 <links>
3344             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3345                         <link field="courses" reltype="has_many" key="term" map="course" class="acmtcm"/>
3346                         <link field="maps" reltype="has_many" key="term" map="" class="acmtcm"/>
3347                 </links>
3348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3349                         <actions>
3350                                 <create permission="MANAGE_RESERVES" context_field="owning_lib" />
3351                                 <retrieve/>
3352                                 <update permission="MANAGE_RESERVES" context_field="owning_lib" />
3353                                 <delete permission="MANAGE_RESERVES" context_field="owning_lib" />
3354                         </actions>
3355                 </permacrud>
3356         </class>
3357     <class id="acmtcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_term_course_map" oils_persist:tablename="asset.course_module_term_course_map" reporter:label="Course Term Map" oils_persist:field_safe="true">
3358         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_course_map_id_seq">
3359             <field reporter:label="Course Term Map ID" name="id" reporter:datatype="id"/>
3360             <field reporter:label="Term" name="term" oils_obj:required="true" reporter:datatype="link"/>
3361             <field reporter:label="Course" name="course" reporter:datatype="link" oils_obj:required="true"/>
3362         </fields>
3363         <links>
3364             <link field="term" reltype="has_a" key="id" map="" class="acmt"/>
3365             <link field="course" reltype="has_a" key="id" map="" class="acmc"/>
3366         </links>
3367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3368             <actions>
3369                 <create permission="MANAGE_RESERVES">
3370                                         <context link="course" field="owning_lib" />
3371                 </create>
3372                 <retrieve/>
3373                 <update permission="MANAGE_RESERVES">
3374                                         <context link="course" field="owning_lib" />
3375                 </update>
3376                 <delete permission="MANAGE_RESERVES">
3377                                         <context link="course" field="owning_lib" />
3378                 </delete>
3379             </actions>
3380         </permacrud>
3381     </class>
3382         <class id="acmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_role" oils_persist:tablename="asset.course_module_role" reporter:label="Course Role" oils_persist:field_safe="true">
3383                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_role_id_seq">
3384                         <field reporter:label="Role ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3385                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3386             <field reporter:label="OPAC Viewable?" name="is_public" reporter:datatype="bool" />
3387                 </fields>
3388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3389                         <actions>
3390                                 <create permission="MANAGE_RESERVES" global_required="true" />
3391                                 <retrieve/>
3392                                 <update permission="MANAGE_RESERVES" global_required="true" />
3393                                 <delete permission="MANAGE_RESERVES" global_required="true" />
3394                         </actions>
3395                 </permacrud>
3396         </class>
3397         
3398     <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">
3399         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3400             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3401             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3402             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3403             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3404         </fields>
3405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3406             <actions>
3407                 <retrieve/>
3408             </actions>
3409         </permacrud>
3410     </class>
3411         <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">
3412                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3413                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3414                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3415                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3416                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3417                 </fields>
3418                 <links>
3419                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3420                 </links>
3421         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3422             <actions>
3423                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3424                 <retrieve/>
3425                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3426                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3427             </actions>
3428         </permacrud>
3429         </class>
3430         <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">
3431                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3432                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3433                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3434                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3435                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3436                 </fields>
3437                 <links>
3438                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3439                 </links>
3440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3441             <actions>
3442                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3443                 <retrieve/>
3444                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3445                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3446             </actions>
3447         </permacrud>
3448         </class>
3449         <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">
3450                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3451                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3452                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3453                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3454                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3455                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3456                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3457                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3458                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3459                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3460                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3461                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3462                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3463                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3464                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3465                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3466                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3467                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3468                         <field reporter:label="Dewey Classification" name="dewey" oils_persist:virtual="true" reporter:datatype="link"/>
3469                 </fields>
3470                 <links>
3471                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3472                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3473                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3474                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3475                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3476                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3477                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3478                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3479                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3480                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3481                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3482                         <link field="dewey" reltype="might_have" key="call_number" map="" class="racnd"/>
3483                 </links>
3484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3485             <actions>
3486                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3487                 <retrieve/>
3488                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3489                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3490             </actions>
3491         </permacrud>
3492         </class>
3493         <class id="racnd" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="reporter::asset_call_number_dewey" oils_persist:tablename="reporter.asset_call_number_dewey" reporter:label="Dewey Classification">
3494                 <fields oils_persist:primary="call_number">
3495                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link" />
3496                         <field reporter:label="Dewey Number" name="dewey" reporter:datatype="text"/>
3497                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
3498                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
3499                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
3500                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
3501                 </fields>
3502                 <links>
3503                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3504                 </links>
3505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3506             <actions>
3507                 <retrieve/>
3508             </actions>
3509         </permacrud>
3510         </class>
3511         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3512                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3513                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3514                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3515                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3516                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3517                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3518                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3519                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3520                 </fields>
3521                 <links>
3522                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3523                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3524         </links>
3525         </class>
3526         <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">
3527                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3528                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3529                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3530                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3531                 </fields>
3532                 <links>
3533                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3534                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3535                 </links>
3536         </class>
3537         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3538                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3539                         <field name="id" reporter:datatype="id" />
3540                         <field name="value" oils_persist:i18n="true" />
3541                 </fields>
3542                 <links/>
3543         </class>
3544         <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">
3545                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3546                         <field name="balance_owed" reporter:datatype="money" />
3547                         <field name="total_owed" reporter:datatype="money" />
3548                         <field name="total_paid" reporter:datatype="money" />
3549                         <field name="usr" reporter:datatype="link"/>
3550                 </fields>
3551                 <links>
3552                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3553         </links>
3554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3555             <actions>
3556                 <retrieve permission="VIEW_USER">
3557                     <context link="usr" field="home_ou"/>
3558                 </retrieve>
3559             </actions>
3560         </permacrud>
3561         </class>
3562         <class id="mowbus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_with_balance_user_summary" oils_persist:tablename="money.open_with_balance_usr_summary" reporter:label="Open User Summary for transactions with balances">
3563                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3564                         <field name="balance_owed" reporter:datatype="money" />
3565                         <field name="total_owed" reporter:datatype="money" />
3566                         <field name="total_paid" reporter:datatype="money" />
3567                         <field name="usr" reporter:datatype="link"/>
3568                 </fields>
3569                 <links>
3570                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3571         </links>
3572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3573             <actions>
3574                 <retrieve permission="VIEW_USER">
3575                     <context link="usr" field="home_ou"/>
3576                 </retrieve>
3577             </actions>
3578         </permacrud>
3579         </class>
3580         <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">
3581                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3582                         <field name="collector" />
3583                         <field name="enter_time" reporter:datatype="timestamp"/>
3584                         <field name="id" reporter:datatype="id" />
3585                         <field name="location" reporter:datatype="link"/>
3586                         <field name="usr" reporter:datatype="link"/>
3587                 </fields>
3588                 <links>
3589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3590                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3591                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3592                 </links>
3593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3594             <actions>
3595                 <create permission="money.collections_tracker.create" context_field="location"/>
3596                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3597                 <delete permission="money.collections_tracker.create" context_field="location"/>
3598             </actions>
3599         </permacrud>
3600         </class>
3601         <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">
3602                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3603                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3606                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3607                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3608                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3609                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3610                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3611                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3612                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3613                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3614                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3615                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3616                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3617                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3618                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3619                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3620                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3621                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3622                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3623                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3624                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3625                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3626                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3627                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3628                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3629                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3630                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3641                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3642                 </fields>
3643                 <links>
3644                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3645                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3646                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3647                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3648                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3649                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3650                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3651                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3652                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3653                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3654                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3655                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3656                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3657                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3658                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3659                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3660                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3661                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3662                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3663                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3664                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3665                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3666                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3667                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3668                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3669                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3670                 </links>
3671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3672             <actions>
3673                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3674                 <retrieve/>
3675                 <update permission="UPDATE_MARC" global_required="true"/>
3676                 <!-- 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. -->
3677                 <delete permission="DELETE_RECORD" global_required="true"/>
3678             </actions>
3679         </permacrud>
3680         </class>
3681         <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">
3682                 <fields oils_persist:primary="id">
3683                         <field name="dow_0_close" />
3684                         <field name="dow_0_open" />
3685                         <field name="dow_1_close" />
3686                         <field name="dow_1_open" />
3687                         <field name="dow_2_close" />
3688                         <field name="dow_2_open" />
3689                         <field name="dow_3_close" />
3690                         <field name="dow_3_open" />
3691                         <field name="dow_4_close" />
3692                         <field name="dow_4_open" />
3693                         <field name="dow_5_close" />
3694                         <field name="dow_5_open" />
3695                         <field name="dow_6_close" />
3696                         <field name="dow_6_open" />
3697                         <field name="id" reporter:datatype="id" />
3698                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3699                 </fields>
3700                 <links>
3701                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3702                 </links>
3703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3704             <actions>
3705                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3706                 <retrieve/>
3707                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3708                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3709             </actions>
3710         </permacrud>
3711         </class>
3712         <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">
3713                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3714                         <field name="id" reporter:datatype="id" />
3715                         <field name="record" reporter:datatype="link"/>
3716                         <field name="label" reporter:datatype="text"/>
3717                         <field name="label_sortkey" reporter:datatype="text"/>
3718                         <field name="deleted" reporter:datatype="bool"/>
3719                 </fields>
3720                 <links>
3721                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3722                 </links>
3723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3724             <actions>
3725                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3726                 <retrieve/>
3727                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3728                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3729             </actions>
3730         </permacrud>
3731         </class>
3732         <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">
3733                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3734                         <field name="id" reporter:datatype="id" />
3735                         <field name="target_copy" reporter:datatype="link" />
3736                         <field name="part" reporter:datatype="link"/>
3737                 </fields>
3738                 <links>
3739                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3740                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3741                 </links>
3742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3743             <actions>
3744                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3745                 <retrieve/>
3746                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3747                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3748             </actions>
3749         </permacrud>
3750         </class>
3751     <class  id="aecc"
3752             controller="open-ils.cstore open-ils.pcrud"
3753             oils_obj:fieldmapper="action::emergency_closing_circulation"
3754             oils_persist:tablename="action.emergency_closing_circulation"
3755             reporter:label="Emergency Closing Circulation Entry"
3756             oils_persist:readonly="true"
3757     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3758         <fields oils_persist:primary="id">
3759             <field name="id" reporter:datatype="id" />
3760             <field name="circulation" reporter:datatype="link" />
3761                         <field name="emergency_closing" reporter:datatype="link"/>
3762             <field name="original_due_date" reporter:datatype="timestamp" />
3763             <field name="process_time" reporter:datatype="timestamp" />
3764         </fields>
3765         <links>
3766             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3767             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3768         </links>
3769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3770             <actions>
3771                 <retrieve/>
3772             </actions>
3773         </permacrud>
3774     </class>
3775     <class  id="aecr"
3776             controller="open-ils.cstore open-ils.pcrud"
3777             oils_obj:fieldmapper="action::emergency_closing_reservation"
3778             oils_persist:tablename="action.emergency_closing_reservation"
3779             reporter:label="Emergency Closing Reservation Entry"
3780             oils_persist:readonly="true"
3781     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3782         <fields oils_persist:primary="id">
3783             <field name="id" reporter:datatype="id" />
3784             <field name="reservation" reporter:datatype="link" />
3785                         <field name="emergency_closing" reporter:datatype="link"/>
3786             <field name="original_end_time" reporter:datatype="timestamp" />
3787             <field name="process_time" reporter:datatype="timestamp" />
3788         </fields>
3789         <links>
3790             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3791             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3792         </links>
3793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3794             <actions>
3795                 <retrieve/>
3796             </actions>
3797         </permacrud>
3798     </class>
3799     <class  id="aech"
3800             controller="open-ils.cstore open-ils.pcrud"
3801             oils_obj:fieldmapper="action::emergency_closing_hold"
3802             oils_persist:tablename="action.emergency_closing_hold"
3803             reporter:label="Emergency Closing Hold Entry"
3804             oils_persist:readonly="true"
3805     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3806         <fields oils_persist:primary="id">
3807             <field name="id" reporter:datatype="id" />
3808             <field name="hold" reporter:datatype="link" />
3809                         <field name="emergency_closing" reporter:datatype="link"/>
3810             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3811             <field name="process_time" reporter:datatype="timestamp" />
3812         </fields>
3813         <links>
3814             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3815             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3816         </links>
3817         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3818             <actions>
3819                 <retrieve/>
3820             </actions>
3821         </permacrud>
3822     </class>
3823     <class  id="aecs"
3824             controller="open-ils.cstore open-ils.pcrud"
3825             oils_obj:fieldmapper="action::emergency_closing_status"
3826             oils_persist:tablename="action.emergency_closing_status"
3827             reporter:label="Emergency Closing Status"
3828             oils_persist:readonly="true"
3829     >
3830         <fields oils_persist:primary="id">
3831             <field name="id" reporter:datatype="id" />
3832             <field name="creator" reporter:datatype="link" />
3833             <field name="create_time" reporter:datatype="timestamp" />
3834             <field name="process_start_time" reporter:datatype="timestamp" />
3835             <field name="process_end_time" reporter:datatype="timestamp" />
3836             <field name="last_update_time" reporter:datatype="timestamp" />
3837             <field name="circulations" reporter:datatype="int" />
3838             <field name="circulations_complete" reporter:datatype="int" />
3839             <field name="reservations" reporter:datatype="int" />
3840             <field name="reservations_complete" reporter:datatype="int" />
3841             <field name="holds" reporter:datatype="int" />
3842             <field name="holds_complete" reporter:datatype="int" />
3843         </fields>
3844         <links>
3845             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3846         </links>
3847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3848             <actions>
3849                 <retrieve/>
3850             </actions>
3851         </permacrud>
3852     </class>
3853     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3854         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3855             <field name="id" reporter:datatype="id" />
3856             <field name="creator" reporter:datatype="link" />
3857             <field name="create_time" reporter:datatype="timestamp" />
3858             <field name="process_start_time" reporter:datatype="timestamp" />
3859             <field name="process_end_time" reporter:datatype="timestamp" />
3860             <field name="last_update_time" reporter:datatype="timestamp" />
3861             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3862             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3863             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3864             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3865             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3866         </fields>
3867         <links>
3868             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3869             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3870             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3871             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3872             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3873             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3874         </links>
3875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3876             <actions>
3877                 <create permission="EMERGENCY_CLOSING">
3878                     <context link="closing" field="org_unit" />
3879                 </create>
3880                 <retrieve/>
3881                 <update permission="EMERGENCY_CLOSING">
3882                     <context link="closing" field="org_unit" />
3883                 </update>
3884                 <delete permission="EMERGENCY_CLOSING">
3885                     <context link="closing" field="org_unit" />
3886                 </delete>
3887             </actions>
3888         </permacrud>
3889     </class>
3890         <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">
3891                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3892                         <field name="close_end" reporter:datatype="timestamp" />
3893                         <field name="close_start" reporter:datatype="timestamp" />
3894                         <field name="id" reporter:datatype="id" />
3895                         <field name="org_unit" reporter:datatype="org_unit"/>
3896                         <field name="reason" reporter:datatype="text"/>
3897                         <field name="full_day" reporter:datatype="bool"/>
3898                         <field name="multi_day" reporter:datatype="bool"/>
3899                         <field name="emergency_closing" reporter:datatype="link"/>
3900                 </fields>
3901                 <links>
3902                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3903                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3904                 </links>
3905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3906             <actions>
3907                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3908                 <retrieve/>
3909                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3910                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3911             </actions>
3912         </permacrud>
3913         </class>
3914         <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">
3915                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3916                         <field name="extended" reporter:datatype="interval"/>
3917                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3918                         <field name="max_renewals" reporter:datatype="int" />
3919                         <field name="name" reporter:datatype="text"/>
3920                         <field name="normal" reporter:datatype="interval"/>
3921                         <field name="shrt" reporter:datatype="interval"/>
3922                         <field name="max_auto_renewals" reporter:datatype="int" />
3923                 </fields>
3924                 <links>
3925                 </links>
3926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3927             <actions>
3928                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3929                 <retrieve/>
3930                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3931                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3932             </actions>
3933         </permacrud>
3934         </class>
3935
3936         <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">
3937                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3938                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3939                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3940             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3941                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3942             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3943                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3944                                 reporter:datatype="link" config_field="true"/>
3945                 </fields>
3946                 <links>
3947             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3948                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3949                 </links>
3950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3951             <actions>
3952                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3953                 <retrieve/>
3954                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3955                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3956             </actions>
3957                 </permacrud>
3958         </class>
3959
3960         <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">
3961                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3962                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3963                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3964                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3965             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3966                 </fields>
3967                 <links>
3968                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3969                 </links>
3970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3971             <actions>
3972                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3973                 <retrieve/>
3974                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3975                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3976             </actions>
3977                 </permacrud>
3978         </class>
3979
3980         <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">
3981                 <fields oils_persist:primary="id" oils_persist:sequence="">
3982                         <field name="balance_owed" reporter:datatype="money"/>
3983                         <field name="id" reporter:datatype="id" />
3984                         <field name="last_billing_note" reporter:datatype="text"/>
3985                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3986                         <field name="last_billing_type" reporter:datatype="text"/>
3987                         <field name="last_payment_note" reporter:datatype="text"/>
3988                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3989                         <field name="last_payment_type" reporter:datatype="text"/>
3990                         <field name="total_owed" reporter:datatype="money"/>
3991                         <field name="total_paid" reporter:datatype="money"/>
3992                         <field name="usr" reporter:datatype="link"/>
3993                         <field name="xact_finish" reporter:datatype="timestamp" />
3994                         <field name="xact_start" reporter:datatype="timestamp" />
3995                         <field name="xact_type" reporter:datatype="text"/>
3996                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3997                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3998                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3999                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
4000                         <field name="billing_location" reporter:datatype="link"/>
4001                 </fields>
4002                 <links>
4003                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4004                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
4005                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4006                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4007                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
4008                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4009                 </links>
4010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4011                         <actions>
4012                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4013                                         <context link="usr" field="home_ou" />
4014                                 </retrieve>
4015                         </actions>
4016                 </permacrud>
4017         </class>
4018         <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">
4019                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
4020                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4021                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
4022                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
4023                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4024                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
4025                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4026                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
4027                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4028                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
4029                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4030                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
4031                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
4032                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4033                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
4034                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
4035                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
4036                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
4037                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
4038                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4039                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
4040                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
4041                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
4042                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
4043                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
4044                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
4045                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
4046                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
4047                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
4048                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
4049                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
4050                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
4051                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
4052                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
4053                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4054                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4055                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
4056                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
4057                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
4058                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
4059                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
4060                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
4061                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
4062                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
4063                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
4064                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
4065                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
4066                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
4067                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
4068                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
4069                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
4070                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
4071                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
4072                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
4073                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
4074                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
4075                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
4076                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
4077                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
4078                         <field reporter:label="Name Keyword internal tsvector" name="name_kw_tsvector" reporter:datatype="text"/>
4079                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4081                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4082                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
4083                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
4084                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4085                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4086                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4088                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4089                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
4090                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
4091                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
4092                 </fields>
4093                 <links>
4094                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
4095                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
4096                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
4097                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
4098                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
4099                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
4100                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
4101                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
4102                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
4103                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
4104                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
4105                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
4106                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
4107                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
4108                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
4109                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
4110                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
4111                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
4112                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
4113                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
4114                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
4115                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
4116                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
4117                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
4118                         <link field="notes" reltype="has_many" key="usr" map="" class="aum"/>
4119                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
4120                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
4121                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
4122                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
4123                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
4124                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
4125                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
4126                 </links>
4127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4128                         <actions>
4129                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
4130                         </actions>
4131                 </permacrud>
4132         </class>
4133         <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">
4134                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
4135                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
4136                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
4137                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
4138                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
4139                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
4140                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
4141                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
4142                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
4143         </fields>
4144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4145                         <actions>
4146                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4147                                 <retrieve/>
4148                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4149                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4150                         </actions>
4151                 </permacrud>
4152         </class>
4153         <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">
4154                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
4155                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4156                         <field name="usr" reporter:label="User" reporter:datatype="link" />
4157                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
4158                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
4159         </fields>
4160         <links>
4161                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4162                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
4163                 </links>
4164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4165                         <actions>
4166                                 <retrieve permission="RUN_REPORTS">
4167                                         <context link="usr" field="home_ou" />
4168                                 </retrieve>
4169                         </actions>
4170                 </permacrud>
4171         </class>
4172         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
4173                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
4174                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4175                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
4176                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
4177                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
4178                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
4179                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
4180         </fields>
4181         <links>
4182                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
4183                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
4184                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
4185                 </links>
4186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4187                         <actions>
4188                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
4189                                         <context link="usr" field="home_ou" />
4190                                         <context link="ws" field="owning_lib" />
4191                                 </retrieve>
4192                                 <create permission="ADMIN_TOOLBAR" context_field="org">
4193                                         <context link="usr" field="home_ou" />
4194                                         <context link="ws" field="owning_lib" />
4195                                 </create>
4196                                 <update permission="ADMIN_TOOLBAR" context_field="org">
4197                                         <context link="usr" field="home_ou" />
4198                                         <context link="ws" field="owning_lib" />
4199                                 </update>
4200                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
4201                                         <context link="usr" field="home_ou" />
4202                                         <context link="ws" field="owning_lib" />
4203                                 </delete>
4204                         </actions>
4205                 </permacrud>
4206         </class>
4207         <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">
4208                 <fields oils_persist:primary="name">
4209                         <field name="name" reporter:datatype="text"/>
4210                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4211                 </fields>
4212                 <links/>
4213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4214                         <actions>
4215                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4216                                 <retrieve/>
4217                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4218                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4219                         </actions>
4220                 </permacrud>
4221         </class>
4222         <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">
4223                 <fields oils_persist:primary="name">
4224                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
4225                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
4226                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
4227                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
4228                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
4229                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
4230                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
4231                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
4232                 </fields>
4233                 <links>
4234                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
4235                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4236                 </links>
4237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4238                         <actions>
4239                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4240                                 <retrieve/>
4241                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4242                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4243                         </actions>
4244                 </permacrud>
4245         </class>
4246         <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">
4247                 <fields oils_persist:primary="name">
4248                         <field name="name" reporter:datatype="text"/>
4249                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4250                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4251                         <field name="datatype" reporter:datatype="text"/>
4252                         <field name="view_perm" reporter:datatype="link"/>
4253                         <field name="update_perm" reporter:datatype="link"/>
4254                         <field name="fm_class" reporter:datatype="text"/>
4255                         <field name="grp" reporter:datatype="link"/>
4256                 </fields>
4257                 <links>
4258                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
4259                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
4260                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
4261                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4262                 </links>
4263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4264                         <actions>
4265                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4266                                 <retrieve/>
4267                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4268                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4269                         </actions>
4270                 </permacrud>
4271         </class>
4272         <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">
4273                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
4274                         <field name="id" />
4275                         <field name="name"  reporter:datatype="text"/>
4276                         <field name="org_unit" reporter:datatype="org_unit"/>
4277                         <field name="value"  reporter:datatype="text"/>
4278                 </fields>
4279                 <links>
4280                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4281                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
4282                 </links>
4283         </class>
4284         <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">
4285                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
4286                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4287                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
4288                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
4289                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
4290                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
4291                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
4292                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
4293                 </fields>
4294                 <links>
4295                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4296                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4297                 </links>
4298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4299             <actions>
4300                 <create permission="CREATE_COPY_NOTE">
4301                     <context link="owning_copy" field="circ_lib"/>
4302                 </create>
4303                 <retrieve permission="VIEW_COPY_NOTES">
4304                     <context link="owning_copy" field="circ_lib"/>
4305                 </retrieve>
4306                 <update permission="UPDATE_COPY_NOTE">
4307                     <context link="owning_copy" field="circ_lib"/>
4308                 </update>
4309                 <delete permission="DELETE_COPY_NOTE">
4310                     <context link="owning_copy" field="circ_lib"/>
4311                 </delete>
4312             </actions>
4313         </permacrud>
4314         </class>
4315         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
4316                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
4317                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
4318                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
4319                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
4320                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4321                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
4322                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
4323                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
4324                 </fields>
4325                 <links>
4326                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4327                 </links>
4328         </class>
4329         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
4330                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
4331                         <field name="fingerprint"  reporter:datatype="text"/>
4332                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
4333                         <field name="master_record" reporter:datatype="link"/>
4334                         <field name="mods"  reporter:datatype="text"/>
4335                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
4336                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4337                 </fields>
4338                 <links>
4339                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
4340                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
4341                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
4342                 </links>
4343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4344                         <actions>
4345                                 <retrieve/>
4346                         </actions>
4347                 </permacrud>
4348         </class>
4349         <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">
4350                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
4351                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4352                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4353                 </fields>
4354                 <links/>
4355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4356             <actions>
4357                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
4358                 <retrieve/>
4359                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
4360                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
4361             </actions>
4362         </permacrud>
4363         </class>
4364         <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">
4365                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
4366                         <field name="code"  reporter:datatype="text"/>
4367                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
4368                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
4369                 </fields>
4370                 <links/>
4371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4372             <actions>
4373                 <create permission="CREATE_PERM" global_required="true"/>
4374                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
4375                 <update permission="UPDATE_PERM" global_required="true"/>
4376                 <delete permission="DELETE_PERM" global_required="true"/>
4377             </actions>
4378         </permacrud>
4379         </class>
4380         <class id="mmrsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
4381                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
4382                         <field name="id" reporter:datatype="id" />
4383                         <field name="metarecord" reporter:datatype="link"/>
4384                         <field name="source" reporter:datatype="link"/>
4385                 </fields>
4386                 <links>
4387                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4388                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4389                 </links>
4390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4391                         <actions>
4392                                 <retrieve/>
4393                         </actions>
4394                 </permacrud>
4395         </class>
4396         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4397                         oils_obj:fieldmapper="metabib::display_entry" 
4398                         oils_persist:tablename="metabib.display_entry" 
4399                         oils_persist:field_safe="true"
4400                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4401                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4402                         <field name="id" reporter:datatype="id" />
4403                         <field name="field" reporter:datatype="link"/>
4404                         <field name="source" reporter:datatype="link"/>
4405                         <field name="value"  reporter:datatype="text"/>
4406                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4407                 </fields>
4408                 <links>
4409                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4410                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4411                 </links>
4412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4413                         <actions>
4414                                 <retrieve/>
4415                         </actions>
4416                 </permacrud>
4417         </class>
4418         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4419                 oils_persist:tablename="metabib.flat_display_entry"
4420                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4421                 oils_persist:field_safe="true"
4422                 reporter:label="Flat Display Entry" 
4423                 oils_persist:readonly="true">
4424                 <fields>
4425                         <field name="source" reporter:datatype="id" />
4426                         <field name="name" reporter:datatype="text"/>
4427                         <field name="multi" reporter:datatype="bool"/>
4428                         <field name="label" reporter:datatype="text"/>
4429                         <field name="field" reporter:datatype="link"/>
4430                         <field name="value" reporter:datatype="text"/>
4431                 </fields>
4432                 <links>
4433                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4434                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4435                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4436                 </links>
4437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4438                         <actions>
4439                                 <retrieve/>
4440                         </actions>
4441                 </permacrud>
4442         </class>
4443         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4444                 oils_persist:tablename="metabib.compressed_display_entry"
4445                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4446                 oils_persist:field_safe="true"
4447                 reporter:label="Compressed Display Entry" 
4448                 oils_persist:readonly="true">
4449                 <fields>
4450                         <field name="source" reporter:datatype="id" />
4451                         <field name="name" reporter:datatype="text"/>
4452                         <field name="multi" reporter:datatype="bool"/>
4453                         <field name="label" reporter:datatype="text"/>
4454                         <field name="field" reporter:datatype="link"/>
4455                         <field name="value" reporter:datatype="text"/>
4456                 </fields>
4457                 <links>
4458                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4459                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4460                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4461                 </links>
4462                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4463                         <actions>
4464                                 <retrieve/>
4465                         </actions>
4466                 </permacrud>
4467         </class>
4468         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4469                 oils_persist:tablename="metabib.wide_display_entry"
4470                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4471                 oils_persist:field_safe="true"
4472                 reporter:label="Wide Display Entry" 
4473                 oils_persist:readonly="true">
4474                 <fields oils_persist:primary="source">
4475                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4476                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4477                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4478                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4479                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4480                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4481                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4482                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4483                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4484                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4485                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4486                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4487                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4488                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4489                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4490                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4491                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4492                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4493                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4494                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4495                 </fields>
4496                 <links>
4497                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4498                 </links>
4499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4500                         <actions>
4501                                 <retrieve/>
4502                         </actions>
4503                 </permacrud>
4504         </class>
4505
4506         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4507                 oils_persist:tablename="config.display_field_map"
4508                 oils_obj:fieldmapper="config::display_field_map"
4509                 oils_persist:field_safe="true"
4510                 reporter:label="Display Field Map">
4511                 <fields oils_persist:primary="name">
4512                         <field name="name" reporter:datatype="text"/>
4513                         <field name="field" reporter:datatype="link"/>
4514                         <field name="multi" reporter:datatype="bool"/>
4515                 </fields>
4516                 <links>
4517                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4518                 </links>
4519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4520                         <actions>
4521                                 <retrieve/>
4522                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4523                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4524                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4525                         </actions>
4526                 </permacrud>
4527         </class>
4528
4529         <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">
4530                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4531                         <field name="id" reporter:datatype="id" />
4532                         <field name="field" reporter:datatype="link"/>
4533                         <field name="source" reporter:datatype="link"/>
4534                         <field name="value"  reporter:datatype="text"/>
4535                 </fields>
4536                 <links>
4537                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4538                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4539                 </links>
4540         </class>
4541         <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">
4542                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4543                         <field name="id" reporter:datatype="id" />
4544                         <field name="value" reporter:datatype="text"/>
4545                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4546                 </fields>
4547                 <links>
4548                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4549                 </links>
4550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4551                         <actions>
4552                                 <retrieve/>
4553                         </actions>
4554                 </permacrud>
4555         </class>
4556         <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">
4557                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4558                         <field name="id" reporter:datatype="id" />
4559                         <field name="entry" reporter:datatype="link"/>
4560                         <field name="def" reporter:datatype="link"/>
4561                         <field name="source" reporter:datatype="link"/>
4562                 </fields>
4563                 <links>
4564                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4565                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4566                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4567                 </links>
4568         </class>
4569         <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">
4570                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4571                         <field name="id" reporter:datatype="id" />
4572                         <field name="entry" reporter:datatype="link"/>
4573                         <field name="simple_heading" reporter:datatype="link"/>
4574                 </fields>
4575                 <links>
4576                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4577                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4578                 </links>
4579         </class>
4580         <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">
4581                 <oils_persist:source_definition><![CDATA[
4582                         SELECT * FROM metabib.author_field_entry
4583                                                 UNION ALL
4584                         SELECT * FROM metabib.keyword_field_entry
4585                                                 UNION ALL
4586                         SELECT * FROM metabib.identifier_field_entry
4587                                                 UNION ALL
4588                         SELECT * FROM metabib.title_field_entry
4589                                                 UNION ALL
4590                         SELECT * FROM metabib.subject_field_entry
4591                                                 UNION ALL
4592                         SELECT * FROM metabib.series_field_entry
4593                 ]]></oils_persist:source_definition>
4594                 <fields>
4595                         <field name="field" reporter:datatype="link"/>
4596                         <field name="id" reporter:datatype="id" />
4597                         <field name="source" reporter:datatype="link"/>
4598                         <field name="value"  reporter:datatype="text"/>
4599                 </fields>
4600                 <links>
4601                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4602                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4603                 </links>
4604         </class>
4605         <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">
4606                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4607                         <field name="field" reporter:datatype="link"/>
4608                         <field name="id" reporter:datatype="id" />
4609                         <field name="source" reporter:datatype="link"/>
4610                         <field name="value"  reporter:datatype="text"/>
4611                 </fields>
4612                 <links>
4613                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4614                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4615                 </links>
4616         </class>
4617         <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">
4618                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4619                         <field name="accepting_usr" reporter:datatype="link"/>
4620                         <field name="amount" reporter:datatype="money" />
4621                         <field name="amount_collected" reporter:datatype="money" />
4622                         <field name="cash_drawer" reporter:datatype="link"/>
4623                         <field name="id" reporter:datatype="id" />
4624                         <field name="note"  reporter:datatype="text"/>
4625                         <field name="payment_ts" reporter:datatype="timestamp"/>
4626                         <field name="xact" reporter:datatype="link"/>
4627                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4628                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4629                 </fields>
4630                 <links>
4631                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4632                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4633                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4634                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4635                 </links>
4636         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4637             <actions>
4638                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4639                     <context link="xact" jump="usr" field="home_ou"/>
4640                 </retrieve>
4641                         </actions>
4642                 </permacrud>
4643         </class>
4644         <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">
4645                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4646                         <field name="accepting_usr" reporter:datatype="link"/>
4647                         <field name="amount" reporter:datatype="money" />
4648                         <field name="amount_collected" reporter:datatype="money" />
4649                         <field name="id" reporter:datatype="id" />
4650                         <field name="note"  reporter:datatype="text"/>
4651                         <field name="payment_ts" reporter:datatype="timestamp"/>
4652                         <field name="xact" reporter:datatype="link"/>
4653                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4654                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4655                 </fields>
4656                 <links>
4657                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4658                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4659                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4660                 </links>
4661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4662             <actions>
4663                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4664                     <context link="xact" jump="usr" field="home_ou"/>
4665                 </retrieve>
4666                         </actions>
4667                 </permacrud>
4668         </class>
4669         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4670                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4671                         <field name="accepting_usr" reporter:datatype="link"/>
4672                         <field name="amount" reporter:datatype="money" />
4673                         <field name="amount_collected" reporter:datatype="money" />
4674                         <field name="id" reporter:datatype="id" />
4675                         <field name="note"  reporter:datatype="text"/>
4676                         <field name="payment_ts" reporter:datatype="timestamp"/>
4677                         <field name="xact" reporter:datatype="link"/>
4678                         <field name="billing" reporter:datatype="link"/>
4679                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4680                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4681                 </fields>
4682                 <links>
4683                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4684                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4685                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4686                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4687                 </links>
4688         </class>
4689         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4690                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4691                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4692                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4693                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4694                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4695                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4696                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4697                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4698                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4699                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4700                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4701                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4702                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4703                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4704                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4705                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4706                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4707                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4708                 </fields>
4709                 <links>
4710                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4711                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4712                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4713                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4714                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4715                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4716                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4717                 </links>
4718         </class>
4719
4720         <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">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4722                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4723                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4724                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4725                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4726                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4727                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4728                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4729                 </fields>
4730                 <links/>
4731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4732             <actions>
4733                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4734                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4735                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4736                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4737             </actions>
4738         </permacrud>
4739         </class>
4740         <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">
4741                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4742                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4743                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4744                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4745                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4746                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4747                 </fields>
4748                 <links>
4749                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4750                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4751                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4752         </links>
4753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4754             <actions>
4755                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4756                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4757                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4758                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4759             </actions>
4760         </permacrud>
4761         </class>
4762         <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="Item Status" oils_persist:field_safe="true">
4763                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4764                         <field name="holdable" reporter:datatype="bool" reporter:label="Holdable"/>
4765                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4766                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
4767                         <field name="opac_visible" reporter:datatype="bool" reporter:label="OPAC Visible"/>
4768             <field name="copy_active" reporter:datatype="bool" reporter:label="Sets Item Active"/>
4769             <field name="restrict_copy_delete" reporter:datatype="bool" reporter:label="Restrict Deletion"/>
4770             <field name="is_available" reporter:datatype="bool" reporter:label="Available"/>
4771             <field name="hopeless_prone" reporter:datatype="bool" reporter:label="Prone to Hopeless Holds?"/>
4772                 </fields>
4773                 <links/>
4774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4775             <actions>
4776                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4777                 <retrieve/>
4778                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4779                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4780             </actions>
4781         </permacrud>
4782         </class>
4783         <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">
4784                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
4785                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4786                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4787                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4788                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4789                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4790                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4791                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4792                         <field name="usr_message" reporter:datatype="link" reporter:label="User Message"/>
4793                 </fields>
4794                 <links>
4795                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4796                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4797                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4798                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4799                         <link field="usr_message" reltype="has_a" key="id" map="" class="aum"/>
4800                 </links>
4801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4802                         <actions>
4803                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4804                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4805                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4806                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4807                         </actions>
4808                 </permacrud>
4809         </class>
4810         <class id="aua" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
4811                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4812                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4813                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4814                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4815                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4816                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4817                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4818                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4819                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4820                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4821                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4822                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4823                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4824                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4825                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4826                 </fields>
4827                 <links>
4828                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4829                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4830                 </links>
4831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4832                         <actions>
4833                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4834                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4835                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4836                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4837                         </actions>
4838                 </permacrud>
4839         </class>
4840         <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">
4841                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4842                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4843                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4844                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4845                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4846                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4847                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4848                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4849                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4850                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4851                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4852                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4853                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4854                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4855                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4856                 </fields>
4857                 <links>
4858                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4859                 </links>
4860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4861                         <actions>
4862                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4863                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4864                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4865                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4866                         </actions>
4867                 </permacrud>
4868         </class>
4869
4870
4871         <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">
4872                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4873                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4874                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4875                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4876                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4877                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4878                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4879                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4880                 </fields>
4881                 <links>
4882                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4883                 </links>
4884         </class>
4885
4886         <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">
4887                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4888                         <field name="call_number" />
4889                         <field name="create_date" reporter:datatype="timestamp"/>
4890                         <field name="creator" reporter:datatype="link"/>
4891                         <field name="id" reporter:datatype="id" />
4892                         <field name="pub" reporter:datatype="bool"/>
4893                         <field name="title"  reporter:datatype="text"/>
4894                         <field name="value"  reporter:datatype="text"/>
4895                 </fields>
4896                 <links>
4897                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4898                 </links>
4899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4900             <actions>
4901                 <create permission="CREATE_VOLUME_NOTE">
4902                     <context link="call_number" field="owning_lib"/>
4903                 </create>
4904                 <retrieve permission="VIEW_VOLUME_NOTES">
4905                     <context link="call_number" field="owning_lib"/>
4906                 </retrieve>
4907                 <update permission="UPDATE_VOLUME_NOTE">
4908                     <context link="call_number" field="owning_lib"/>
4909                 </update>
4910                 <delete permission="DELETE_VOLUME_NOTE">
4911                     <context link="call_number" field="owning_lib"/>
4912                 </delete>
4913             </actions>
4914         </permacrud>
4915         </class>
4916         <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">
4917                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4918                         <field name="create_date" reporter:datatype="timestamp"/>
4919                         <field name="creator" reporter:datatype="link"/>
4920                         <field name="edit_date" reporter:datatype="timestamp"/>
4921                         <field name="editor" reporter:datatype="link"/>
4922                         <field name="id" reporter:datatype="id" />
4923                         <field name="record" reporter:datatype="link"/>
4924                         <field name="value" reporter:datatype="text"/>
4925                 </fields>
4926                 <links>
4927                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4928                 </links>
4929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4930             <actions>
4931                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4932                 <retrieve/>
4933                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4934                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4935             </actions>
4936         </permacrud>
4937         </class>
4938         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4939         <oils_persist:source_definition><![CDATA[
4940 SELECT  usr,
4941         SUM(
4942             CASE
4943                 WHEN (
4944                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4945                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4946                 ) THEN 1
4947                 ELSE 0
4948             END
4949         ) AS out,
4950
4951         SUM(
4952             CASE
4953                 WHEN (
4954                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4955                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4956                 ) THEN 1
4957                 ELSE 0
4958             END
4959         ) AS overdue,
4960
4961         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4962         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4963         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4964   FROM  action.circulation
4965   WHERE checkin_time IS NULL
4966   GROUP BY 1
4967         ]]></oils_persist:source_definition>
4968         <fields oils_persist:primary="usr">
4969             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4970             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4971             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4972             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4973             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4974             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4975         </fields>
4976         <links>
4977             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4978         </links>
4979         </class>
4980         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4981         <oils_persist:source_definition><![CDATA[
4982 SELECT  usr,
4983         STRING_AGG(
4984             CASE
4985                 WHEN (
4986                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4987                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4988                 ) THEN id::TEXT
4989                 ELSE '0'
4990             END
4991         ,',') AS out,
4992
4993         STRING_AGG(
4994             CASE
4995                 WHEN (
4996                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4997                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4998                 ) THEN id::TEXT
4999                 ELSE '0'
5000             END
5001         ,',') AS overdue,
5002
5003         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
5004         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
5005         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
5006   FROM  action.circulation
5007   WHERE checkin_time IS NULL
5008   GROUP BY 1
5009         ]]></oils_persist:source_definition>
5010         <fields oils_persist:primary="usr">
5011             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
5012             <field reporter:label="Out" name="out" reporter:datatype="text"/>
5013             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
5014             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
5015             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
5016             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
5017         </fields>
5018         <links>
5019             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5020         </links>
5021         </class>
5022         <class id="acsp" controller="open-ils.cstore" oils_obj:fieldmapper="action::curbside" oils_persist:tablename="action.curbside" reporter:label="Curbside Appointment Slot">
5023                 <fields oils_persist:primary="id" oils_persist:sequence="action.curbside_id_seq">
5024                         <field reporter:label="Appointment ID" name="id" reporter:datatype="id" />
5025                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5026                         <field reporter:label="Pickup Library" name="org" reporter:datatype="org_unit"/>
5027                         <field reporter:label="Appointment Date/Time" name="slot" reporter:datatype="timestamp"/>
5028                         <field reporter:label="Staged" name="staged" reporter:datatype="timestamp"/>
5029                         <field reporter:label="Staging Staff" name="stage_staff" reporter:datatype="link"/>
5030                         <field reporter:label="Arrival Date/Time" name="arrival" reporter:datatype="timestamp"/>
5031                         <field reporter:label="Delivery Date/Time" name="delivered" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Delivery Staff" name="delivery_staff" reporter:datatype="link"/>
5033                         <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
5034                 </fields>
5035                 <links>
5036                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5037                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5038                         <link field="stage_staff" reltype="has_a" key="id" map="" class="au"/>
5039                         <link field="delivery_staff" reltype="has_a" key="id" map="" class="au"/>
5040                 </links>
5041         </class>
5042         <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">
5043                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5044                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5045                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5046                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5047                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
5048                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5049                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5050                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5051                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5052                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5053                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5054                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5055                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5056                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5057                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5058                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5059                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5060                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5061                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5062                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5063                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5064                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5065                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5066                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5067                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5068                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5069                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5070                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5071                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5072                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5073                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5074                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5075                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5076                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5077                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5078                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5079                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5080                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5081                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5082                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5083                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5084                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5085                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5086                 </fields>
5087                 <links>
5088                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5089                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5090                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5091                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5092                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5093                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5094                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5095                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5096                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5097                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5098                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5099                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5100                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5101                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5102                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5103                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5104                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5105                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
5106                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5107                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5108                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5109                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5110                 </links>
5111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5112                         <actions>
5113                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5114                         </actions>
5115                 </permacrud>
5116         </class>
5117         <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">
5118                 <fields>
5119                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5120                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5121                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
5122                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5123                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
5124                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5125                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
5126                 </fields>
5127                 <links>
5128                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5129                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5130                 </links>
5131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5132                         <actions>
5133                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5134                         </actions>
5135                 </permacrud>
5136         </class>
5137         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="false" reporter:label="Combined Aged and Active Circulations (Slim Version)" oils_persist:readonly="true">
5138                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5139                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5140                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5141                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5142                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5143                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5144                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5145                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5146                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5147                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5148                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5149                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5150                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5151                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5152                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5153                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5154                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5155                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5156                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5157                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5158                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5159                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5161                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5162                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5163                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5164                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5165                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5166                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5167                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5168                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5172                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5173                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5174                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5175                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5176                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5177                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5178                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5179                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5180                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5181                 </fields>
5182                 <links>
5183                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5184                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5185                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5186                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5187                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5189                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5190                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5191                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5192                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5193                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5194                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5195                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5196                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5197                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5198                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5199                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5200                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5201                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5202                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5203                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5204                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5205                 </links>
5206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207                         <actions>
5208                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5209                         </actions>
5210                 </permacrud>
5211         </class>
5212
5213         <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">
5214                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5215                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5216                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5217                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5218                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5219                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5220                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5221                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5222                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5223                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5224                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5225                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5226                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5227                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5228                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5229                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5230                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5231                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5232                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5233                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5234                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5235                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5236                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5237                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5238                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5239                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5240                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5241                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5242                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5243                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5244                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5245                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5246                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5247                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5248                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5249                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5250                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5251                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5252                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5253                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5254                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5255                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5256                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5257                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5258                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5259                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5260                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5261                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5262                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5263                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5264                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5265                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5266                 </fields>
5267                 <links>
5268                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5269                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5270                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5271                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5272                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5273                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5274                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5275                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5276                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5277                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5278                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5279                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5280                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5281                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5282                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5283                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5284                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5285                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5286                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5287                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5288                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5289                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5290                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5291                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5292                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5293                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5294                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5295                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5296                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5297                 </links>
5298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5299                         <actions>
5300                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5301                         </actions>
5302                 </permacrud>
5303         </class>
5304         <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">
5305                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5306                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5307                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5308                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5309                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5310                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5311                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5312                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5313                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5314                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5315                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5316                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5317                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5318                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5319                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5320                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5321                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5322                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5323                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5324                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5325                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5326                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5327                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5328                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5329                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5330                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5331                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5332                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5333                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5334                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5335                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5336                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5337                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5338                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5339                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5340                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5341                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5342                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5343                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5344                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5345                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5346                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5347                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5348                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5349                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5350                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5351                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5352                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5353                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5354                 </fields>
5355                 <links>
5356                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5357                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5358                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5359                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5360                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5361                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5362                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5363                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5364                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5365                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5366                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5367                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5368                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5369                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5370                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5371                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5372                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5373                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5374                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5375                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5376                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5377                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
5378                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5379                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5380                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5381                 </links>
5382         </class>
5383         <class id="auch" 
5384                 controller="open-ils.cstore" 
5385                 oils_obj:fieldmapper="action::user_circ_history" 
5386                 oils_persist:tablename="action.usr_circ_history" 
5387                 reporter:label="User Checkout History">
5388                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
5389                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5390                         <!-- prevent reporting on the user that owns the checkout history -->
5391                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
5392                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5393                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
5394                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
5395                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
5396                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
5397                 </fields>
5398                 <links>
5399                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5400                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5401                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
5402                 </links>
5403         </class>
5404         <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">
5405                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
5406                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5407                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5408                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5409                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5410                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5411                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5412                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5413                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5414                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5415                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5416                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5417                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5418                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5419                 </fields>
5420                 <links>
5421                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5422                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5423                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5424                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5425                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5426                 </links>
5427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5428                         <actions>
5429                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5430                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5431                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5432                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5433                         </actions>
5434                 </permacrud>
5435         </class>
5436
5437         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5438                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5439                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5440                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5441                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5442                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5443                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5444                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5445                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5446                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5447                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5448                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5449                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5450                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5451                 </fields>
5452                 <links>
5453                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5454                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5455                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5456                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5457                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5458                 </links>
5459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5460                         <actions>
5461                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5462                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5463                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5464                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5465                         </actions>
5466                 </permacrud>
5467         </class>
5468         
5469         <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">
5470                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5471                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5472                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5473                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5474                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5475                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5476                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5477                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5478                 </fields>
5479                 <links>
5480                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5481                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5482                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5483                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5484                 </links>
5485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5486                         <actions>
5487                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5488                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5489                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5490                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5491                         </actions>
5492                 </permacrud>
5493         </class>
5494         
5495         <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">
5496                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5497                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5498                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5499                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5500                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5501                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5502                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5503                 </fields>
5504                 <links>
5505                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5506                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5507                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5508                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5509                 </links>
5510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5511                         <actions>
5512                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5513                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5514                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5515                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5516                         </actions>
5517                 </permacrud>
5518         </class>
5519         
5520         <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">
5521                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5522                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5523                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5524                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5525                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5526                 </fields>
5527                 <links>
5528                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5529                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5530                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5531                 </links>
5532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5533                         <actions>
5534                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5535                     <context link="resource" field="owner" />
5536                 </create>
5537                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5538                     <context link="resource" field="owner" />
5539                 </retrieve>
5540                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5541                     <context link="resource" field="owner" />
5542                 </update>
5543                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5544                     <context link="resource" field="owner" />
5545                 </delete>
5546                         </actions>
5547                 </permacrud>
5548         </class>
5549         
5550         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5551                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5552                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5553                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5554                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5555                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5556                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5557                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5558                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5559                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5560                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5561                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5562                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5563                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5564                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5565                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5566                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5567                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5568                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5569                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5570                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5571                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5572                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5573                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5574                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5575                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5576                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5577                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5578                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5579                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5580                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5581                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5582                 </fields>
5583                 <links>
5584                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5585                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5586                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5587                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5588                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5589                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5590                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5591                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5592                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5593                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5594                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5595                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5596                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5597                 </links>
5598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5599                         <actions>
5600                                 <create permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5601                                 <retrieve permission="VIEW_BOOKING_RESERVATION" context_field="pickup_lib"/>
5602                                 <update permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5603                                 <delete permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5604                         </actions>
5605                 </permacrud>
5606         </class>
5607         
5608         <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">
5609                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5610                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5611                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5612                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5613                 </fields>
5614                 <links>
5615                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5616                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5617                 </links>
5618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5619                         <actions>
5620                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5621                                         <context link="reservation" field="pickup_lib"/>
5622                                 </create>
5623                                 <retrieve permission="VIEW_BOOKING_RESERVATION_ATTR_MAP">
5624                                         <context link="reservation" field="pickup_lib"/>
5625                                 </retrieve>
5626                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5627                                         <context link="reservation" field="pickup_lib"/>
5628                                 </update>
5629                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5630                                         <context link="reservation" field="pickup_lib"/>
5631                                 </delete>
5632                         </actions>
5633                 </permacrud>
5634         </class>
5635
5636         <class id="ccnbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
5637                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5638                         <field name="bucket" reporter:datatype="link"/>
5639                         <field name="id" reporter:datatype="id" />
5640                         <field name="target_call_number" reporter:datatype="link" />
5641                         <field name="create_time" reporter:datatype="timestamp" />
5642                         <field name="pos" reporter:datatype="int" />
5643                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5644                 </fields>
5645                 <links>
5646                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5647                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5648             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5649                 </links>
5650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5651                         <actions>
5652                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5653                     <context link="bucket" owning_lib="owning_lib"/>
5654                 </retrieve>
5655             </actions>
5656         </permacrud>
5657         </class>
5658         <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">
5659                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5660                         <field name="id" reporter:datatype="id" />
5661                         <field name="item" reporter:datatype="link"/>
5662                         <field name="note" reporter:datatype="text" />
5663                 </fields>
5664                 <links>
5665                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5666                 </links>
5667         </class>
5668         <class id="cbreb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
5669                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5670                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5671                         <field name="btype" reporter:datatype="text"/>
5672                         <field name="id" reporter:datatype="id" />
5673                         <field name="name" reporter:datatype="text"/>
5674                         <field name="description" reporter:datatype="text"/>
5675                         <field name="owner" reporter:datatype="link"/>
5676                         <field name="pub" reporter:datatype="bool"/>
5677                         <field name="create_time" reporter:datatype="timestamp" />
5678                         <field name="owning_lib" reporter:datatype="org_unit" />
5679                 </fields>
5680                 <links>
5681                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5682                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5683                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5684                 </links>
5685                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5686                         <actions>
5687                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5688                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5689                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5690                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5691                         </actions>
5692                 </permacrud>
5693         </class>
5694         <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">
5695                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5696                         <field name="id" reporter:datatype="id" />
5697                         <field name="bucket" reporter:datatype="link"/>
5698                         <field name="note" reporter:datatype="text" />
5699                 </fields>
5700                 <links>
5701                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5702                 </links>
5703         </class>
5704         <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">
5705                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5706                         <field name="hold" reporter:datatype="link"/>
5707                         <field name="id" reporter:datatype="id" />
5708                         <field name="target_copy" reporter:datatype="link"/>
5709                         <field name="proximity" reporter:datatype="number"/>
5710                 </fields>
5711                 <links>
5712                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5713                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5714                 </links>
5715         </class>
5716         <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">
5717                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5718                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5719                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5720                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5721                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5722                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5723                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5724                 </fields>
5725                 <links>
5726                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5727                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5728                 </links>
5729         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5730             <actions>
5731                 <create permission="CREATE_HOLD_NOTIFICATION">
5732                                         <context link="hold" jump="usr" field="home_ou" />
5733                                 </create>
5734                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5735                                         <context link="hold" jump="usr" field="home_ou" />
5736                                 </retrieve>
5737                 <update permission="CREATE_HOLD_NOTIFICATION">
5738                                         <context link="hold" jump="usr" field="home_ou" />
5739                                 </update>
5740                 <delete permission="CREATE_HOLD_NOTIFICATION">
5741                                         <context link="hold" jump="usr" field="home_ou" />
5742                                 </delete>
5743             </actions>
5744         </permacrud>
5745         </class>
5746         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Shelving Location"  oils_persist:field_safe="true">
5747                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5748                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5749                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5750                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5751                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5752                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5753                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5754                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5755                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5756                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5757                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5758                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5759                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5760                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5761                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5762                 </fields>
5763                 <links>
5764                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5765                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5766                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5767                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5768                 </links>
5769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5770             <actions>
5771                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5772                 <retrieve/>
5773                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5774                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5775             </actions>
5776         </permacrud>
5777         </class>
5778         <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">
5779                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5780                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5781                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5782                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5783                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" />
5784             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5785             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5786             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5787                 </fields>
5788                 <links>
5789                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5790                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5791                 </links>
5792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5793             <actions>
5794                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5795                 <retrieve/>
5796                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5797                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5798             </actions>
5799         </permacrud>
5800         </class>
5801         <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">
5802                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5803                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5804             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5805             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5806                 </fields>
5807                 <links>
5808                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5809                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5810                 </links>
5811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5812             <actions>
5813                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5814                                         <context link="lgroup" field="owner" />
5815                 </create>
5816                 <retrieve/>
5817                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5818                                         <context link="lgroup" field="owner" />
5819                 </update>
5820                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5821                                         <context link="lgroup" field="owner" />
5822                 </delete>
5823             </actions>
5824         </permacrud>
5825         </class>
5826
5827     <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">
5828         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5829             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5830             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5831             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5832             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5833         </fields>
5834         <links>
5835             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5836             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5837         </links>
5838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5839             <actions>
5840                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5841                 <retrieve/>
5842                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5843                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5844             </actions>
5845         </permacrud>
5846     </class>
5847
5848         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5849                 <fields>
5850                         <field name="sre_id" oils_persist:virtual="true" />
5851                         <field name="location" oils_persist:virtual="true" />
5852                         <field name="owning_lib" oils_persist:virtual="true" />
5853                         <field name="basic_holdings" oils_persist:virtual="true" />
5854                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5855                         <field name="supplement_holdings" oils_persist:virtual="true" />
5856                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5857                         <field name="index_holdings" oils_persist:virtual="true" />
5858                         <field name="index_holdings_add" oils_persist:virtual="true" />
5859                         <field name="online" oils_persist:virtual="true" />
5860                         <field name="missing" oils_persist:virtual="true" />
5861                         <field name="incomplete" oils_persist:virtual="true" />
5862                 </fields>
5863         </class>
5864
5865         <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">
5866                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5867                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5868                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5869                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5870                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5871                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5872                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5873                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5874                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5875                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5876                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5877                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5878                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5879                 </fields>
5880                 <links>
5881                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5882                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5883                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5884                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5885                 </links>
5886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5887                         <actions>
5888                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5889                                 <retrieve/>
5890                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5891                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5892                         </actions>
5893                 </permacrud>
5894         </class>
5895
5896         <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">
5897                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5899                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5900                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5901                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5902                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5903                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5904                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5905                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5906                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5907                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5908                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5909                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5910                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5911                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5912                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5913                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5914                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5915                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5916                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5917                 </fields>
5918                 <links>
5919                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5920                 </links>
5921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5922                         <actions>
5923                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5924                                         <context link="subscription" field="owning_lib" />
5925                                 </create>
5926                                 <retrieve />
5927                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5928                                         <context link="subscription" field="owning_lib" />
5929                                 </update>
5930                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5931                                         <context link="subscription" field="owning_lib" />
5932                                 </delete>
5933                         </actions>
5934                 </permacrud>
5935         </class>
5936
5937         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5938                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5939                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5940                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5941                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5942                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5943                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5944                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5945                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5946                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5947                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5948                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5949                 </fields>
5950                 <links>
5951                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5952                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5953                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5954                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5955                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5956                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5957                 </links>
5958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5959                         <actions>
5960                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5961                                 <retrieve />
5962                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5963                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5964                         </actions>
5965                 </permacrud>
5966         </class>
5967
5968         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5969                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5970                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5971                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5972                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5973                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5974                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5975                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5976                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5977                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5978                 </fields>
5979                 <links>
5980                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5981                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5982                 </links>
5983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5984                         <actions>
5985                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5986                     <context link="subscription" field="owning_lib"/>
5987                 </create>
5988                                 <retrieve />
5989                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5990                     <context link="subscription" field="owning_lib"/>
5991                 </update>
5992                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5993                     <context link="subscription" field="owning_lib"/>
5994                 </delete>
5995                         </actions>
5996                 </permacrud>
5997         </class>
5998
5999         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
6000                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
6001                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6002                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
6003                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
6004                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6005                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
6006                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6007                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
6008                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
6009                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
6010                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
6011                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
6012                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
6013                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
6014                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
6015                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6016                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6017                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6018                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6019                 </fields>
6020                 <links>
6021                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
6022                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6023                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
6024                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
6025                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
6026                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
6027                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
6028                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
6029                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
6030                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
6031                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
6032                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
6033                 </links>
6034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6035                         <actions>
6036                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6037                                 <retrieve />
6038                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6039                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6040                         </actions>
6041                 </permacrud>
6042         </class>
6043
6044         <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">
6045                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
6046                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6047                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6048                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6049                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6050                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6051                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6052                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6053                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6054                 </fields>
6055                 <links>
6056                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6057                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6058                 </links>
6059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6060                         <actions>
6061                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6062                                         <context link="distribution" field="holding_lib" />
6063                                 </create>
6064                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
6065                                         <context link="distribution" field="holding_lib" />
6066                                 </retrieve>
6067                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6068                                         <context link="distribution" field="holding_lib" />
6069                                 </update>
6070                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6071                                         <context link="distribution" field="holding_lib" />
6072                                 </delete>
6073                         </actions>
6074                 </permacrud>
6075         </class>
6076
6077         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
6078                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
6079                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6080                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6081                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
6082                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6083                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
6084                 </fields>
6085                 <links>
6086                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6087                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
6088                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
6089                 </links>
6090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6091                         <actions>
6092                                 <create permission="ADMIN_SERIAL_STREAM">
6093                                         <context link="distribution" field="holding_lib" />
6094                                 </create>
6095                                 <retrieve />
6096                                 <update permission="ADMIN_SERIAL_STREAM">
6097                                         <context link="distribution" field="holding_lib" />
6098                                 </update>
6099                                 <delete permission="ADMIN_SERIAL_STREAM">
6100                                         <context link="distribution" field="holding_lib" />
6101                                 </delete>
6102                         </actions>
6103                 </permacrud>
6104         </class>
6105
6106         <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">
6107                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
6108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6109                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6110                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
6111                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
6112                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
6113                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6114                 </fields>
6115                 <links>
6116                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6117                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
6118                 </links>
6119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6120                         <actions>
6121                                 <create permission="ADMIN_SERIAL_STREAM">
6122                                         <context link="stream" jump="distribution" field="holding_lib" />
6123                                 </create>
6124                                 <retrieve permission="RECEIVE_SERIAL">
6125                                         <context link="stream" jump="distribution" field="holding_lib" />
6126                                 </retrieve>
6127                                 <update permission="ADMIN_SERIAL_STREAM">
6128                                         <context link="stream" jump="distribution" field="holding_lib" />
6129                                 </update>
6130                                 <delete permission="ADMIN_SERIAL_STREAM">
6131                                         <context link="stream" jump="distribution" field="holding_lib" />
6132                                 </delete>
6133                         </actions>
6134                 </permacrud>
6135         </class>
6136
6137         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
6138                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
6139                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6140                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6141                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6142                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6143                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6144                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6145                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
6146                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6147                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
6148                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
6149                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
6150                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
6151                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6152                 </fields>
6153                 <links>
6154                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6155                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6156                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6157                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
6158                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
6159                 </links>
6160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6161                         <actions>
6162                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
6163                                         <context link="subscription" field="owning_lib" />
6164                                 </create>
6165                                 <retrieve/>
6166                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
6167                                         <context link="subscription" field="owning_lib" />
6168                                 </update>
6169                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
6170                                         <context link="subscription" field="owning_lib" />
6171                                 </delete>
6172                         </actions>
6173                 </permacrud>
6174         </class>
6175
6176         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
6177                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6178                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6179                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6180                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6181                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6182                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6183                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6184                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6185                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6186                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6187                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6188                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6189                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6190                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6191                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6192                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6193                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6194                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6195                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6196                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6197                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6198                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6199                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6200                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6201                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6202                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6203                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6204                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6205                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6206                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6207                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6208                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6209                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6210                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6211                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
6212                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
6213                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
6214                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6215                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6216                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6217                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6218                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6219                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6220                 </fields>
6221                 <links>
6222                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6223                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6224                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6225                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6226                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6227                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6228                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6229                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6230                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6231                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6232                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6233                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6234                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6235                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6236                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6237                 </links>
6238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6239                         <actions>
6240                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6241                                 <retrieve/>
6242                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6243                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6244                         </actions>
6245                 </permacrud>
6246         </class>
6247
6248         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
6249                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
6250                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6251                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6252                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6253                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6254                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6255                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
6256                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6257                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
6258                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
6259                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
6260                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
6261                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6262                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6263                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
6264                 </fields>
6265                 <links>
6266                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6267                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6268                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6269                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6270                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
6271                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
6272                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
6273                 </links>
6274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6275                         <actions>
6276                                 <create permission="ADMIN_SERIAL_ITEM">
6277                                         <context link="stream" jump="distribution" field="holding_lib" />
6278                                 </create>
6279                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6280                                         <context link="stream" jump="distribution" field="holding_lib" />
6281                                 </retrieve>
6282                                 <update permission="ADMIN_SERIAL_ITEM">
6283                                         <context link="stream" jump="distribution" field="holding_lib" />
6284                                 </update>
6285                                 <delete permission="ADMIN_SERIAL_ITEM">
6286                                         <context link="stream" jump="distribution" field="holding_lib" />
6287                                 </delete>
6288                         </actions>
6289                 </permacrud>
6290         </class>
6291
6292         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
6293                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
6294                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6295                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
6296                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6297                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6298                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6299                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6300                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6301                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6302                 </fields>
6303                 <links>
6304                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6305                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6306                 </links>
6307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6308                         <actions>
6309                                 <create permission="ADMIN_SERIAL_ITEM">
6310                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6311                                 </create>
6312                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6313                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6314                                 </retrieve>
6315                                 <update permission="ADMIN_SERIAL_ITEM">
6316                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6317                                 </update>
6318                                 <delete permission="ADMIN_SERIAL_ITEM">
6319                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6320                                 </delete>
6321                         </actions>
6322                 </permacrud>
6323         </class>
6324         <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">
6325                 <fields>
6326                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
6327                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
6328                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
6329                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
6330                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
6331                 </fields>
6332                 <links>
6333                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6334                 </links>
6335         </class>
6336         <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">
6337                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
6338                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6339                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
6340                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
6341                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
6342                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
6343                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
6344                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
6345                 </fields>
6346                 <links>
6347                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6348                 </links>
6349         </class>
6350         <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">
6351                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
6352                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6353                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6354                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6355                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6356                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6357                 </fields>
6358                 <links>
6359                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6360                 </links>
6361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6362                         <actions>
6363                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6364                                         <context link="distribution" field="holding_lib" />
6365                                 </create>
6366                                 <retrieve/>
6367                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6368                                         <context link="distribution" field="holding_lib" />
6369                                 </update>
6370                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6371                                         <context link="distribution" field="holding_lib" />
6372                                 </delete>
6373                         </actions>
6374                 </permacrud>
6375         </class>
6376
6377         <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">
6378                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
6379                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6380                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6381                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6382                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6383                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6384                 </fields>
6385                 <links>
6386                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6387                 </links>
6388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6389                         <actions>
6390                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6391                                         <context link="distribution" field="holding_lib" />
6392                                 </create>
6393                                 <retrieve/>
6394                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6395                                         <context link="distribution" field="holding_lib" />
6396                                 </update>
6397                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6398                                         <context link="distribution" field="holding_lib" />
6399                                 </delete>
6400                         </actions>
6401                 </permacrud>
6402         </class>
6403
6404         <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">
6405                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
6406                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6407                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6408                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6409                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6410                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6411                 </fields>
6412                 <links>
6413                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6414                 </links>
6415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6416                         <actions>
6417                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6418                                         <context link="distribution" field="holding_lib" />
6419                                 </create>
6420                                 <retrieve/>
6421                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6422                                         <context link="distribution" field="holding_lib" />
6423                                 </update>
6424                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6425                                         <context link="distribution" field="holding_lib" />
6426                                 </delete>
6427                         </actions>
6428                 </permacrud>
6429         </class>
6430
6431         <class id="spt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::pattern_template" oils_persist:tablename="serial.pattern_template" reporter:label="Prediction Pattern Template">
6432                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6433                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6434                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6435                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6436                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6437                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6438                 </fields>
6439                 <links>
6440                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6441                 </links>
6442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6443                         <actions>
6444                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6445                                 <retrieve/>
6446                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6447                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6448                         </actions>
6449                 </permacrud>
6450         </class>
6451
6452         <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">
6453                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6454                         <field name="id" reporter:datatype="id" />
6455                         <field name="owning_copy" reporter:datatype="link"/>
6456                         <field name="stat_cat" reporter:datatype="link"/>
6457                         <field name="stat_cat_entry" reporter:datatype="link"/>
6458                 </fields>
6459                 <links>
6460                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6461                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6462                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6463                 </links>
6464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6465                         <actions>
6466                                 <retrieve/>
6467                         </actions>
6468                 </permacrud>
6469         </class>
6470         <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">
6471                 <fields oils_persist:primary="code">
6472                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6473                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6474                 </fields>
6475                 <links/>
6476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6477             <actions>
6478                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6479                 <retrieve/>
6480                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6481                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6482             </actions>
6483         </permacrud>
6484         </class>
6485         <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">
6486                 <fields oils_persist:primary="code">
6487                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6488                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6489                 </fields>
6490                 <links/>
6491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6492             <actions>
6493                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6494                 <retrieve/>
6495                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6496                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6497             </actions>
6498         </permacrud>
6499         </class>
6500         <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">
6501                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6502                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6503                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6504                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6505                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6506                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6507                 </fields>
6508                 <links>
6509             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6510         </links>
6511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6512             <actions>
6513                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6514                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6515                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6516                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6517             </actions>
6518         </permacrud>
6519         </class>
6520         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Library Group">
6521                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6522                         <field reporter:label="Library Group ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6523                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6524                         <field reporter:label="Global?" name="global" reporter:datatype="bool"/>
6525                         <field reporter:label="Maps" name="maps" oils_persist:virtual="true" reporter:datatype="link"/>
6526                 </fields>
6527                 <links>
6528                         <link field="maps" reltype="has_many" key="lasso" map="" class="lmap"/>
6529         </links>
6530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6531             <actions>
6532                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6533                 <retrieve/>
6534                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6535                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6536             </actions>
6537         </permacrud>
6538         </class>
6539         <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="Library Group Map">
6540                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6541                         <field reporter:label="Library Group Map ID" name="id" reporter:datatype="id" />
6542                         <field reporter:label="Library Group" name="lasso" reporter:datatype="link"/>
6543                         <field reporter:label="Organizational Unit" name="org_unit" reporter:datatype="org_unit"/>
6544                 </fields>
6545                 <links>
6546                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6547                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6548                 </links>
6549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6550             <actions>
6551                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6552                 <retrieve/>
6553                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6554                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6555             </actions>
6556         </permacrud>
6557         </class>
6558         <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">
6559                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6560                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6561                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6562                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6563                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6564                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6565                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6566                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6567                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6568                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6569                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6570                 </fields>
6571                 <links>
6572                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6573                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6574                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6575                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6576                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6577                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6578                 </links>
6579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6580             <actions>
6581                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6582                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6583                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6584                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6585             </actions>
6586         </permacrud>
6587         </class>
6588         <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">
6589                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6590                         <field name="id" reporter:datatype="id" />
6591                         <field name="from_org" reporter:datatype="org_unit"/>
6592                         <field name="to_org" reporter:datatype="org_unit"/>
6593                         <field name="prox" reporter:datatype="int" />
6594                 </fields>
6595                 <links>
6596                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6597                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6598                 </links>
6599         </class>
6600         <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">
6601                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6602                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6603                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6604                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6605                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6606                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6607                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6608                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6609                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6610                 </fields>
6611                 <links/>
6612         </class>
6613         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6614                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6615                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6616                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6617                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6618                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6619                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6620                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6621                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6622                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6623                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6624                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6625                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6626                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6627                 </fields>
6628                 <links>
6629                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6630                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6631                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6632                 </links>
6633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6634             <actions>
6635                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6636                 <retrieve/>
6637                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6638                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6639             </actions>
6640         </permacrud>
6641         </class>
6642         <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">
6643                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6644                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6645                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6646                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6647                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6648                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6649                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6650                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6651                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6652                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6653                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6654                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6655                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6656                         <field name="latitude" reporter:label="Latitude" reporter:datatype="float"/>
6657                         <field name="longitude" reporter:label="Longitude" reporter:datatype="float"/>
6658                 </fields>
6659                 <links>
6660                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6661                 </links>
6662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6663             <actions>
6664                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6665                 <retrieve/>
6666                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6667                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6668             </actions>
6669         </permacrud>
6670         </class>
6671         <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">
6672                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6673                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6674                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6675                         <field name="query_text" reporter:datatype="text"/>
6676                 </fields>
6677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6678             <actions>
6679                 <retrieve/>
6680             </actions>
6681         </permacrud>
6682         </class>
6683
6684         <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">
6685                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6686                         <field name="id" reporter:datatype="id" reporter:selector="label" reporter:label="ID" oils_obj:required="true"/>
6687                         <field name="owner" reporter:datatype="org_unit" reporter:label="Owning Org Unit" oils_obj:required="true"/>
6688                         <field name="code" reporter:datatype="text" reporter:label="Code" oils_obj:required="true"/>
6689                         <field name="label" reporter:datatype="text" oils_persist:i18n="true" reporter:label="Label" oils_obj:required="true"/>
6690                         <field name="create_date" reporter:datatype="timestamp" reporter:label="Create Date"/>
6691                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link" reporter:label="Group Entries"/>
6692                 </fields>
6693                 <links>
6694                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6695                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6696                 </links>
6697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6698             <actions>
6699                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6700                 <retrieve/>
6701                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6702                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6703             </actions>
6704         </permacrud>
6705         </class>
6706         <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">
6707                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6708                         <field name="id" reporter:datatype="id" reporter:label="ID" oils_obj:required="true"/>
6709                         <field name="grp" reporter:datatype="link" reporter:label="Search Filter Group" oils_obj:required="true"/>
6710                         <field name="pos" reporter:datatype="int" reporter:label="Position" oils_obj:required="true"/>
6711                         <field name="query" reporter:datatype="link" reporter:label="Query" oils_obj:required="true"/>
6712                 </fields>
6713                 <links>
6714                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6715                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6716                 </links>
6717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6718             <actions>
6719                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6720                     <context link="grp" field="owner"/>
6721                 </create>
6722                 <retrieve/>
6723                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6724                     <context link="grp" field="owner"/>
6725                 </update>
6726                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6727                     <context link="grp" field="owner"/>
6728                 </delete>
6729             </actions>
6730         </permacrud>
6731         </class>
6732
6733         <!-- A note: Please update alhr and ahopl when updating ahr -->
6734         <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">
6735                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6736                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6737                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6738                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6739                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6740                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6741                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6742                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6743                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6744                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6745                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6746                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6747                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6748                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6749                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6750                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6751                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6752                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6753                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6754                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6755                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6756                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6757                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6758                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6759                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6760                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6761                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6762                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6763                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6764                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6765                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6767                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6768                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6769                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6770                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6771                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6772                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6773                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6774                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6775                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6776                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6777                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6778                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6779                 </fields>
6780                 <links>
6781                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6782                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6783                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6784                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6785                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6786                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6787                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6788                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6789                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6790                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6791                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6792                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6793                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6794                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6795                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6796                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6797                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6798                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6799                 </links>
6800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6801                         <actions>
6802                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6803                         </actions>
6804                 </permacrud>
6805         </class>
6806         <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">
6807                 <oils_persist:source_definition><![CDATA[
6808                 SELECT
6809                         ahr.*,
6810                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6811                                 copy_location_order_position,
6812                         CASE WHEN au.alias IS NOT NULL THEN
6813                                 au.alias
6814                         ELSE
6815                                 au.first_given_name
6816                         END AS usr_alias_or_first_given_name,
6817                         au.first_given_name AS usr_first_given_name,
6818                         au.second_given_name AS usr_second_given_name,
6819                         au.family_name AS usr_family_name,
6820                         au.prefix AS usr_prefix,
6821                         au.suffix AS usr_suffix,
6822                         au.alias AS usr_alias,
6823                         CASE WHEN au.alias IS NOT NULL THEN
6824                                 au.alias
6825                         ELSE
6826                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6827                                         COALESCE(au.family_name, ''),
6828                                         COALESCE(au.suffix, ''),
6829                                         ', ',
6830                                         COALESCE(au.prefix, ''),
6831                                         COALESCE(au.first_given_name, ''),
6832                                         COALESCE(au.second_given_name, '')
6833                                 ], ' '), E'\\s+,', ',')
6834                         END AS usr_alias_or_display_name,
6835                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6836                                 COALESCE(au.family_name, ''),
6837                                 COALESCE(au.suffix, ''),
6838                                 ', ',
6839                                 COALESCE(au.prefix, ''),
6840                                 COALESCE(au.first_given_name, ''),
6841                                 COALESCE(au.second_given_name, '')
6842                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6843                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6844                                 AS call_number_label,
6845                         siss.label AS issuance_label,
6846                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6847                         ahcm_1.copy_count AS potential_copies
6848                 FROM action.hold_request ahr
6849                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6850                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6851                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6852                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6853                 JOIN actor.usr au ON (au.id = ahr.usr)
6854                 JOIN (
6855                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6856                         FROM asset.copy_location
6857                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6858                 LEFT JOIN actor.usr_standing_penalty ausp 
6859                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6860                 LEFT JOIN config.standing_penalty csp
6861                         ON (
6862                                 csp.id = ausp.standing_penalty AND 
6863                                 csp.block_list LIKE '%CAPTURE%' AND (
6864                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6865                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6866                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6867                                         )
6868                                 )
6869                         )
6870                 JOIN (
6871                         SELECT COUNT(target_copy) AS copy_count, hold
6872                         FROM action.hold_copy_map
6873                         GROUP BY 2
6874                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6875                 LEFT JOIN serial.issuance siss
6876                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6877                 LEFT JOIN asset.copy_location_order acplo
6878                         ON (acp.location = acplo.location AND
6879                                 acp.circ_lib = acplo.org)
6880                 WHERE
6881                         ahr.capture_time IS NULL AND
6882                         ahr.cancel_time IS NULL AND
6883                         csp.id IS NULL AND
6884                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6885                         acp.status IN (0,7)
6886                 ]]></oils_persist:source_definition>
6887                 <fields oils_persist:primary="id">
6888                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6889                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6890                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6891                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6892                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6893                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6894                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6895                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6896                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6897                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6898                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6899                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6900                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6901                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6902                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6903                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6904                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6905                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6906                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6907                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6908                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6909                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6910                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6911                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6912                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6913                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6914                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6915                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6916                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6917                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6918                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6919                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6920                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6921                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6922                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6923                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6924                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6925                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6926                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6927                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6928                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6929                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6930                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6931                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6932                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6933                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6934                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6935                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6936                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6937                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6938                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6939                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6940                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6941                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6942                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6943                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6944                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6945                 </fields>
6946                 <links>
6947                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6948                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6949                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6950                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6951                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6952                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6953                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6954                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6955                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6956                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6957                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6958                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6959                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6960                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6961                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6962                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6963                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6964                 </links>
6965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6966                         <actions>
6967                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6968                         </actions>
6969                 </permacrud>
6970         </class>
6971         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6972                 <oils_persist:source_definition><![CDATA[
6973                         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)
6974                 ]]></oils_persist:source_definition>
6975                 <fields oils_persist:primary="id">
6976                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6977                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6978                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6979                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6980                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6981                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6982                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6983                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6984                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6985                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6986                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6987                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6988                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6989                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6990                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6991                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6992                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6993                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6994                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6995                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6996                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6997                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6998                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6999                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
7000                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
7001                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
7002                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7003                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
7004                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7005                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7006                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7007                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7008                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7009                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7010                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7011                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7012                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
7013                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7014                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
7015                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
7016                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
7017                 </fields>
7018                 <links>
7019                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7020                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7021                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7022                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7023                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
7024                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7025                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7026                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7027                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
7028                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
7029                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
7030                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7031                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7032                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
7033                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7034                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
7035                 </links>
7036         </class>
7037
7038         <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">
7039                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
7040                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7041                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7042                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7043                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
7044                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
7045                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
7046                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
7047                 </fields>
7048                 <links>
7049                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7050                 </links>
7051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7052                         <actions>
7053                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
7054                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
7055                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
7056                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
7057                         </actions>
7058                 </permacrud>
7059         </class>
7060         <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">
7061                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7062                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7063                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7064                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7065                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7066                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7067                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7068                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7069                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7070                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7071                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7072                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7073                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7074                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7075                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7076                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7077                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7078                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7079                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7080                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7081                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7082                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7083                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7084                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7085                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7086                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7087                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7088                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7089                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7090                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7091                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7092                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7093                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7094                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7095                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7096                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7097                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7098                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
7099                 </fields>
7100                 <links>
7101                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7102                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7103                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7104                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7105                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7106                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7107                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7108                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7109                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7110                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7111                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7112                 </links>
7113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7114                         <actions>
7115                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7116                         </actions>
7117                 </permacrud>
7118         </class>
7119         <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">
7120                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7121                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7122                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7123                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7124                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7125                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7126                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7127                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7128                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7129                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7130                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7131                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7132                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7133                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7134                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7135                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7136                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7137                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7138                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7139                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7140                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7141                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7142                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7143                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7144                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7145                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7146                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7147                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7148                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7149                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7150                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7151                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7152                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7153                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7154                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7155                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7156                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7157                 </fields>
7158                 <links>
7159                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7160                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7161                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7162                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7163                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7164                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7165                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7166                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7167                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7168                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7169                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7170                 </links>
7171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7172                         <actions>
7173                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7174                         </actions>
7175                 </permacrud>
7176         </class>
7177
7178         <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">
7179                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
7180                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
7181                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
7182                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
7183                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
7184                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
7185                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
7186                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
7187                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
7188                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
7189                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
7190                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7191                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
7192                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7193                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
7194                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
7195                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
7196                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7197                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
7198                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
7199                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
7200                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
7201                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7202                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
7204                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
7211                 </fields>
7212                 <links>
7213                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
7214                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
7215                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
7216                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
7217                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
7218                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
7219                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7220                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
7221                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
7222                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
7223                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
7224                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
7225                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
7226                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
7227                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
7228                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
7229                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
7230                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
7231                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
7232                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
7233                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
7234                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
7235                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
7236                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
7237                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
7238                 </links>
7239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7240             <actions>
7241                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
7242                 <retrieve />
7243                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
7244                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
7245             </actions>
7246         </permacrud>
7247         </class>
7248         <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">
7249                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
7250                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7251                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
7252                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
7253                 </fields>
7254                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7255                         <actions>
7256                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7257                                 <retrieve/>
7258                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7259                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7260                         </actions>
7261                 </permacrud>
7262         </class>
7263         <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">
7264                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
7265                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7266                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
7267                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
7268                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
7269                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
7270                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
7271                 </fields>
7272                 <links>
7273                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
7274                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7275                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
7276                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
7277                 </links>
7278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7279                         <actions>
7280                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7281                                 <retrieve/>
7282                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7283                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7284                         </actions>
7285                 </permacrud>
7286         </class>
7287         <class id="ccnb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
7288                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
7289                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7290                         <field name="btype" reporter:datatype="text"/>
7291                         <field name="id" reporter:datatype="id" />
7292                         <field name="name"  reporter:datatype="text"/>
7293                         <field name="description" reporter:datatype="text"/>
7294                         <field name="owner" reporter:datatype="link"/>
7295                         <field name="pub" reporter:datatype="bool"/>
7296                         <field name="create_time" reporter:datatype="timestamp" />
7297                         <field name="owning_lib" reporter:datatype="org_unit" />
7298                 </fields>
7299                 <links>
7300                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7301                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7302                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
7303                 </links>
7304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7305                         <actions>
7306                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7307                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7308                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7309                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7310                         </actions>
7311                 </permacrud>
7312         </class>
7313         <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">
7314                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
7315                         <field name="id" reporter:datatype="id" />
7316                         <field name="bucket" reporter:datatype="link"/>
7317                         <field name="note" reporter:datatype="text" />
7318                 </fields>
7319                 <links>
7320                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
7321                 </links>
7322         </class>
7323         <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">
7324                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
7325                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7326                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7328                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7329                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7330                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7331                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7332                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7333                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7334                 </fields>
7335                 <links>
7336                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7337                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
7338                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
7339                 </links>
7340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7341                         <actions>
7342                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7343                         </actions>
7344                 </permacrud>
7345         </class>
7346         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
7347                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
7348                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
7349                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7350                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
7351                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7352                 </fields>
7353                 <links>
7354                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7355                 </links>
7356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7357                         <actions>
7358                                 <retrieve permission="VIEW_USER user_request.view">
7359                                         <context link="usr" field="home_ou" />
7360                                 </retrieve>
7361                         </actions>
7362                 </permacrud>
7363         </class>
7364     <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">
7365         <fields oils_persist:primary="field">
7366             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7367             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7368             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7369         </fields>
7370         <links/>
7371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7372             <actions>
7373                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
7374                 <retrieve />
7375                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
7376                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
7377             </actions>
7378         </permacrud>
7379     </class>
7380         <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">
7381                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
7382                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7383                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7384                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7385                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7386                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7387                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7388                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
7389                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7390                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7391                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7392                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7393                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
7394                 </fields>
7395                 <links>
7396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7397                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
7398                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
7399                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
7400                 </links>
7401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7402             <actions>
7403                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
7404                 <retrieve />
7405                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
7406                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
7407             </actions>
7408         </permacrud>
7409         </class>
7410         <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">
7411                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
7412                         <field name="field" reporter:datatype="link"/>
7413                         <field name="id" reporter:datatype="id" />
7414                         <field name="source" reporter:datatype="link"/>
7415                         <field name="value"  reporter:datatype="text"/>
7416                 </fields>
7417                 <links>
7418                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7419                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7420                 </links>
7421         </class>
7422         <class id="cub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
7424                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7425                         <field name="btype" reporter:datatype="text"/>
7426                         <field name="id" reporter:datatype="id" />
7427                         <field name="name"  reporter:datatype="text"/>
7428                         <field name="description" reporter:datatype="text"/>
7429                         <field name="owner" reporter:datatype="link"/>
7430                         <field name="pub" reporter:datatype="bool"/>
7431                         <field name="create_time" reporter:datatype="timestamp" />
7432                         <field name="owning_lib" reporter:datatype="org_unit" />
7433                 </fields>
7434                 <links>
7435                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7436                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7437                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7438                 </links>
7439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7440                         <actions>
7441                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7442                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7443                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7444                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7445                         </actions>
7446                 </permacrud>
7447         </class>
7448         <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">
7449                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7450                         <field name="id" reporter:datatype="id" />
7451                         <field name="bucket" reporter:datatype="link"/>
7452                         <field name="note" reporter:datatype="text" />
7453                 </fields>
7454                 <links>
7455                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7456                 </links>
7457         </class>
7458         <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">
7459                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7460                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7461                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7462                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7463                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7464                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7465                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7466                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7467                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7468                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7469                 </fields>
7470                 <links>
7471                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7472                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7473                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
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="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7484                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7485                         <field name="id" reporter:datatype="id" />
7486                         <field name="ind1" />
7487                         <field name="ind2" />
7488                         <field name="record" />
7489                         <field name="subfield" />
7490                         <field name="tag" />
7491                         <field name="value" />
7492                 </fields>
7493                 <links>
7494                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7495                 </links>
7496         </class>
7497         <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">
7498                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7499                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7500                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7501                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7502                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7503                 </fields>
7504                 <links>
7505                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7506                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7507                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7508                 </links>
7509         </class>
7510         <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">
7511                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7512                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7513                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7514                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7515                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7516                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7517                 </fields>
7518                 <links>
7519                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7520                 </links>
7521         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7522             <actions>
7523                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7524                 <retrieve/>
7525                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7526                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7527             </actions>
7528         </permacrud>
7529
7530         </class>
7531         <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">
7532                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7533                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7534                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7535                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7536                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7537                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7538                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7539                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7540                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7541                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7542                 </fields>
7543                 <links>
7544                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7545                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7546                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7547                 </links>
7548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7549             <actions>
7550                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7551                 <retrieve/>
7552                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7553                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7554             </actions>
7555         </permacrud>
7556         </class>
7557         <class id="bren" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note" oils_persist:field_safe="true">
7558                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7559                         <field reporter:label="Creation Date" name="create_date" reporter:datatype="timestamp"/>
7560                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7561                         <field reporter:label="Last Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7562                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7563                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
7564                         <field reporter:label="Public" name="pub" reporter:datatype="bool"/>
7565                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
7566                         <field reporter:label="Note" name="value" reporter:datatype="text"/>
7567                         <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/> 
7568                 </fields>
7569                 <links>
7570                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7571                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7572                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7573                 </links>
7574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7575                 <actions>
7576                     <create permission="CREATE_RECORD_NOTE" global_required="true"/>
7577                     <retrieve/>
7578                     <update permission="UPDATE_RECORD_NOTE" global_required="true"/>
7579                     <delete permission="DELETE_RECORD_NOTE" global_required="true"/>
7580                 </actions>
7581              </permacrud>
7582         </class>
7583         <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">
7584                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7585                         <field name="balance_owed" reporter:datatype="money" />
7586                         <field name="total_owed" reporter:datatype="money" />
7587                         <field name="total_paid" reporter:datatype="money" />
7588                         <field name="usr" reporter:datatype="link"/>
7589                 </fields>
7590                 <links>
7591                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7592                 </links>
7593         </class>
7594     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7595                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7596                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7597                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7598                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7599                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7600                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7601                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7602                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7603                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7604                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7605                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7606                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7607                 </fields>
7608                 <links>
7609                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7610                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7611                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7612                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7613                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7614                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7615                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7616                 </links>
7617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7618             <actions>
7619                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7620             </actions>
7621         </permacrud>
7622         </class>
7623         <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">
7624                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7625                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7626                         <field name="quality" reporter:datatype="int" />
7627                         <field name="source" reporter:datatype="text"/>
7628                         <field name="transcendant" reporter:datatype="bool"/>
7629                         <field name="can_have_copies" reporter:datatype="bool"/>
7630                 </fields>
7631                 <links/>
7632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7633             <actions>
7634                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7635                 <retrieve/>
7636                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7637                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7638             </actions>
7639         </permacrud>
7640         </class>
7641         <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">
7642                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7643                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7644                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7645                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7646                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7647                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7648                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7649                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7650                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7651                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7652                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7653                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7654                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7655                 </fields>
7656                 <links>
7657                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7658                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7659                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7660                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7661                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7662                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7663                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7664                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7665                 </links>
7666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7667                         <actions>
7668                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7669                                         <context link="usr" field="home_ou" />
7670                                 </retrieve>
7671                         </actions>
7672                 </permacrud>
7673         </class>
7674         <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">
7675                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7676                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7677                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7678                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7679                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7680                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7681                 </fields>
7682                 <links>
7683                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7684                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7685                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7686                 </links>
7687         </class>
7688         <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">
7689                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7690                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7691                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7692                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7693                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7694                 </fields>
7695                 <links>
7696                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7697                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7698                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7699                 </links>
7700         </class>
7701         <class id="cubi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
7702                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7703                         <field name="bucket" reporter:datatype="link"/>
7704                         <field name="id" reporter:datatype="id" />
7705                         <field name="target_user" reporter:datatype="link"/>
7706                         <field name="create_time" reporter:datatype="timestamp" />
7707                         <field name="pos" reporter:datatype="int" />
7708                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7709                 </fields>
7710                 <links>
7711                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7712                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7713             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7714                 </links>
7715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7716                         <actions>
7717                                 <retrieve permission="ADMIN_USER_BUCKET">
7718                     <context link="bucket" owning_lib="owning_lib"/>
7719                 </retrieve>
7720             </actions>
7721         </permacrud>
7722         </class>
7723         <class id="abhe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::batch_hold_event" oils_persist:tablename="action.batch_hold_event" reporter:label="Hold Group Event">
7724                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_id_seq">
7725                         <field name="id" reporter:datatype="id" />
7726                         <field name="staff" reporter:datatype="link"/>
7727                         <field name="bucket" reporter:datatype="link"/>
7728                         <field name="target" reporter:datatype="int" />
7729                         <field name="hold_type" reporter:datatype="text" />
7730                         <field name="run_date" reporter:datatype="timestamp" />
7731                         <field name="cancelled" reporter:datatype="timestamp" />
7732                         <field name="mappings" oils_persist:virtual="true" reporter:datatype="link" />
7733                 </fields>
7734                 <links>
7735                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7736                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7737                         <link field="mappings" reltype="has_many" key="batch_hold_event" map="" class="abhem"/>
7738                 </links>
7739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7740                         <actions>
7741                 <create permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7742                 <retrieve/>
7743                 <update permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7744                 <delete permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7745             </actions>
7746         </permacrud>
7747         </class>
7748         <class id="abhem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::batch_hold_event_map" oils_persist:tablename="action.batch_hold_event_map" reporter:label="Hold Group Event Map">
7749                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_map_id_seq">
7750                         <field name="id" reporter:datatype="id" />
7751                         <field name="batch_hold_event" reporter:datatype="link"/>
7752                         <field name="hold" reporter:datatype="link"/>
7753                 </fields>
7754                 <links>
7755                         <link field="batch_hold_event" reltype="has_a" key="id" map="" class="abhe"/>
7756                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7757                 </links>
7758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7759                         <actions>
7760                 <retrieve/>
7761             </actions>
7762         </permacrud>
7763         </class>
7764         <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">
7765                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7766                         <field name="id" reporter:datatype="id" />
7767                         <field name="item" reporter:datatype="link"/>
7768                         <field name="note" reporter:datatype="text" />
7769                 </fields>
7770                 <links>
7771                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7772                 </links>
7773         </class>
7774         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7775                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7776                         <field name="balance_owed" reporter:datatype="money" />
7777                         <field name="total_owed" reporter:datatype="money" />
7778                         <field name="total_paid" reporter:datatype="money" />
7779                         <field name="usr" reporter:datatype="link"/>
7780                 </fields>
7781                 <links>
7782                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7783                 </links>
7784         </class>
7785         <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">
7786                 <fields oils_persist:primary="code" oils_persist:sequence="">
7787                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7788                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7789                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7790                 </fields>
7791                 <links/>
7792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7793             <actions>
7794                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7795                 <retrieve/>
7796                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7797                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7798             </actions>
7799         </permacrud>
7800         </class>
7801         <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">
7802                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7803                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7804                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7805                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7806                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7807                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7808                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7809                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7810                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7811                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7812                 </fields>
7813                 <links>
7814                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7815                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7816                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7817                 </links>
7818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7819             <actions>
7820                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7821                     <context link="xact" jump="usr" field="home_ou"/>
7822                 </retrieve>
7823                         </actions>
7824                 </permacrud>
7825         </class>
7826         <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">
7827                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7828                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7829                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7830                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7831                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7832                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7833                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7834                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7835                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7836                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7837                 </fields>
7838                 <links>
7839                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7840                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7841                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7842                 </links>
7843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7844             <actions>
7845                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7846                     <context link="xact" jump="usr" field="home_ou"/>
7847                 </retrieve>
7848                         </actions>
7849                 </permacrud>
7850         </class>
7851         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7852                 <fields oils_persist:primary="id" oils_persist:sequence="">
7853                         <field name="checkin_lib" reporter:datatype="link"/>
7854                         <field name="checkin_staff" reporter:datatype="link"/>
7855                         <field name="checkin_time" reporter:datatype="timestamp"/>
7856                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7857                         <field name="circ_staff" reporter:datatype="link"/>
7858                         <field name="desk_renewal" reporter:datatype="bool"/>
7859                         <field name="due_date" reporter:datatype="timestamp"/>
7860                         <field name="duration" reporter:datatype="interval"/>
7861                         <field name="duration_rule" reporter:datatype="link"/>
7862                         <field name="fine_interval" reporter:datatype="interval"/>
7863                         <field name="id" reporter:datatype="id" />
7864                         <field name="max_fine" reporter:datatype="money" />
7865                         <field name="max_fine_rule" reporter:datatype="link"/>
7866                         <field name="opac_renewal" reporter:datatype="bool"/>
7867                         <field name="phone_renewal" reporter:datatype="bool"/>
7868                         <field name="recurring_fine" reporter:datatype="money" />
7869                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7870                         <field name="renewal_remaining" reporter:datatype="int" />
7871             <field name="grace_period" reporter:datatype="interval" />
7872                         <field name="stop_fines" reporter:datatype="text"/>
7873                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7874                         <field name="target_copy" reporter:datatype="link"/>
7875                         <field name="usr" reporter:datatype="link"/>
7876                         <field name="xact_finish" reporter:datatype="timestamp" />
7877                         <field name="xact_start" reporter:datatype="timestamp" />
7878                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7879                         <field name="auto_renewal" reporter:datatype="bool"/>
7880                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7881                 </fields>
7882                 <links>
7883                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7884                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7885                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7886                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7887                 </links>
7888         </class>
7889         <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">
7890                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7891                         <field name="field" reporter:datatype="link"/>
7892                         <field name="id" reporter:datatype="id" />
7893                         <field name="source" reporter:datatype="link"/>
7894                         <field name="value" reporter:datatype="text"/>
7895                 </fields>
7896                 <links>
7897                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7898                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7899                 </links>
7900         </class>
7901         <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">
7902                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7903                         <field name="high" reporter:datatype="money" />
7904                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7905                         <field name="low" reporter:datatype="money" />
7906                         <field name="name" reporter:datatype="text"/>
7907                         <field name="normal" reporter:datatype="money" />
7908                         <field name="recurrence_interval" reporter:datatype="interval"/>
7909             <field name="grace_period" reporter:datatype="interval" />
7910                 </fields>
7911                 <links/>
7912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7913             <actions>
7914                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7915                 <retrieve/>
7916                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7917                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7918             </actions>
7919         </permacrud>
7920         </class>
7921         <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">
7922                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7923                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7924                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7925                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7926                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7927                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7928                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7929                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7930                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7931                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7932                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7933                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7934                 </fields>
7935                 <links>
7936                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7937                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7938                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7939                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7940                 </links>
7941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7942             <actions>
7943                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7944                     <context link="xact" jump="usr" field="home_ou"/>
7945                 </retrieve>
7946                         </actions>
7947                 </permacrud>
7948         </class>
7949         <class id="mdcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::debit_card_payment" oils_persist:tablename="money.debit_card_payment" reporter:label="Debit Card Payment">
7950                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7951                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7952                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7953                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7954                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7955                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7956                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7957                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7958                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7959                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7960                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7961                 </fields>
7962                 <links>
7963                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7964                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7965                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7966                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7967                 </links>
7968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7969             <actions>
7970                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7971                     <context link="xact" jump="usr" field="home_ou"/>
7972                 </retrieve>
7973                         </actions>
7974                 </permacrud>
7975         </class>
7976         <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">
7977                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7978                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7979                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7980                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7981                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7982                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7983                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7984                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7985                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7986                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7987                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7988                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7989                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7990                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7991                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7992                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7993                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7994                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7995                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7996                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7997                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7998                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7999                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
8000                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
8001                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8002                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
8003                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
8004                         <field reporter:label="Price" name="price" reporter:datatype="money" />
8005                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
8006                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
8007                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
8008                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
8009                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8010                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
8011                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
8012                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
8013                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8014                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8015                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8016                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
8017                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
8018                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
8019                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8020                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
8021                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
8022                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
8023                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
8024                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
8025                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
8026                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8027                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
8028                 </fields>
8029                 <links>
8030                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8031                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8032                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8033                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8034                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8035                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8036                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8037                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
8038                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
8039                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
8040                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
8041                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
8042                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
8043                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
8044                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
8045                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
8046                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8047                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
8048                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
8049                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
8050                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
8051                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
8052                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8053                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
8054                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
8055                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
8056                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8057                 </links>
8058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8059             <actions>
8060                 <create permission="CREATE_COPY">
8061                     <context link="call_number" field="owning_lib"/>
8062                 </create>
8063                 <retrieve/>
8064                 <update permission="UPDATE_COPY">
8065                     <context link="call_number" field="owning_lib"/>
8066                 </update>
8067                 <delete permission="DELETE_COPY">
8068                     <context link="call_number" field="owning_lib"/>
8069                 </delete>
8070             </actions>
8071         </permacrud>
8072         </class>
8073
8074         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::latest_inventory" oils_persist:tablename="asset.latest_inventory" reporter:core="true" reporter:label="Latest Inventory">
8075                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
8076             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
8077                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
8078                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
8079                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
8080                 </fields>
8081                 <links>
8082                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
8083                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8084                 </links>
8085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8086             <actions>
8087                                 <create/>
8088                                 <retrieve/>
8089                                 <update/>
8090                                 <delete/>
8091             </actions>
8092         </permacrud>
8093         </class>
8094
8095         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
8096                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
8097                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
8098                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
8099                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8100                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8101                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8102                         <field reporter:label="Event" name="event" reporter:datatype="text" />
8103                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
8104                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
8105                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
8106                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
8107                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
8108                 </fields>
8109                 <links>
8110                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
8111                 </links>
8112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8113             <actions>
8114                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8115                 <retrieve/>
8116                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8117                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
8118             </actions>
8119         </permacrud>
8120         </class>
8121
8122         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Item Alert Suppression">
8123                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
8124                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8125                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
8126                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8127                 </fields>
8128                 <links>
8129                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8130                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8131                 </links>
8132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8133             <actions>
8134                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8135                 <retrieve/>
8136                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8137                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
8138             </actions>
8139         </permacrud>
8140         </class>
8141
8142         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
8143                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
8144                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8145                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8146                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8147                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8148                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8149                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8150                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8151                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8152                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8153                 </fields>
8154                 <links>
8155                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8156                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8157                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8158                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8159                 </links>
8160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8161             <actions>
8162                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8163                     <context link="copy" field="circ_lib"/>
8164                 </create>
8165                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8166                     <context link="copy" field="circ_lib"/>
8167                                 </retrieve>
8168                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8169                     <context link="copy" field="circ_lib"/>
8170                                 </update>
8171                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8172                     <context link="copy" field="circ_lib"/>
8173                                 </delete>
8174             </actions>
8175         </permacrud>
8176         </class>
8177
8178         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
8179                 <fields oils_persist:primary="id">
8180                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8181                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8182                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8183                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8184                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8185                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8186                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8187                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8188                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8189                 </fields>
8190                 <links>
8191                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8192                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8193                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8194                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8195                 </links>
8196         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8197             <actions>
8198                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8199                     <context link="copy" field="circ_lib"/>
8200                 </create>
8201                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8202                     <context link="copy" field="circ_lib"/>
8203                                 </retrieve>
8204                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8205                     <context link="copy" field="circ_lib"/>
8206                                 </update>
8207                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8208                     <context link="copy" field="circ_lib"/>
8209                                 </delete>
8210             </actions>
8211         </permacrud>
8212         </class>
8213
8214         <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">
8215                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
8216                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
8217                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
8218                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8219                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8220                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8221                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8222                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8223                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
8224                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
8225                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8226                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8227                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8228                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
8229                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
8230                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
8231                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
8232                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
8233                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
8234                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
8235                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
8236                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
8237                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
8238                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
8239                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8240                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
8241                 </fields>
8242                 <links>
8243                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8244                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8245                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8246                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8247                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8248                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8249                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8250                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8251                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8252                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8253                 </links>
8254                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8255                         <actions>
8256                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8257                                 <retrieve />
8258                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8259                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8260                         </actions>
8261                 </permacrud>
8262         </class>
8263
8264         <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">
8265                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
8266                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
8267                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8268                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8269                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
8270                 </fields>
8271                 <links/>
8272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8273             <actions>
8274                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8275                 <retrieve/>
8276                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8277                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8278             </actions>
8279         </permacrud>
8280         </class>
8281         <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">
8282                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
8283                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
8284                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8285                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8286                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
8287                 </fields>
8288                 <links/>
8289         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8290             <actions>
8291                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8292                 <retrieve/>
8293                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8294                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8295             </actions>
8296         </permacrud>
8297         </class>
8298         <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">
8299                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
8300                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8302                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8303                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8304                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8305                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
8306                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
8307                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
8308                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
8309                 </fields>
8310                 <links>
8311                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
8312                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
8313                 </links>
8314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8315             <actions>
8316                 <create permission="CREATE_PERM" global_required="true"/>
8317                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8318                 <update permission="UPDATE_PERM" global_required="true"/>
8319                 <delete permission="DELETE_PERM" global_required="true"/>
8320             </actions>
8321         </permacrud>
8322         </class>
8323         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
8324                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
8325                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8326                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
8327                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8328                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
8329                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8330                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8331                 </fields>
8332                 <links>
8333                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
8334                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8335                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8336                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
8337                 </links>
8338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8339                         <actions>
8340                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8341                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8342                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8343                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8344                         </actions>
8345                 </permacrud>
8346         </class>
8347         <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">
8348                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
8349                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
8350                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
8351                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
8352                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
8353                 </fields>
8354                 <links>
8355                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
8356                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
8357                 </links>
8358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8359             <actions>
8360                 <create permission="ADMIN_SURVEY">
8361                     <context link="question" jump="survey" field="owner"/>
8362                 </create>
8363                 <retrieve/>
8364                 <update permission="ADMIN_SURVEY">
8365                     <context link="question" jump="survey" field="owner"/>
8366                 </update>
8367                 <delete permission="ADMIN_SURVEY">
8368                     <context link="question" jump="survey" field="owner"/>
8369                 </delete>
8370             </actions>
8371         </permacrud>
8372         </class>
8373         <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">
8374                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
8375                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8376                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
8377                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
8378                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
8379                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
8380                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
8381                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
8382                 </fields>
8383                 <links>
8384                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
8385                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
8386                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
8387                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8388                 </links>
8389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8390                         <actions>
8391                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
8392                         </actions>
8393                 </permacrud>
8394         </class>
8395         <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">
8396                 <fields oils_persist:primary="usr" oils_persist:sequence="">
8397                         <field name="balance_owed" reporter:datatype="money" />
8398                         <field name="total_owed" reporter:datatype="money" />
8399                         <field name="total_paid" reporter:datatype="money" />
8400                         <field name="usr" reporter:datatype="link"/>
8401                 </fields>
8402                 <links>
8403                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8404                 </links>
8405         </class>
8406         <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">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
8408                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
8409                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
8410                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
8411                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
8412                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8413                 </fields>
8414                 <links>
8415                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8416                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
8417                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8418                 </links>
8419         </class>
8420         <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">
8421                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
8422                         <field name="field" reporter:datatype="link"/>
8423                         <field name="id" reporter:datatype="id" />
8424                         <field name="source" reporter:datatype="link"/>
8425                         <field name="value" reporter:datatype="text"/>
8426                 </fields>
8427                 <links>
8428                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8429                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8430                 </links>
8431         </class>
8432         <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">
8433                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
8434                         <field name="field" reporter:datatype="link"/>
8435                         <field name="id" reporter:datatype="id" />
8436                         <field name="source" reporter:datatype="link"/>
8437                         <field name="value" reporter:datatype="text"/>
8438                 </fields>
8439                 <links>
8440                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8441                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8442                 </links>
8443         </class>
8444         <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">
8445                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
8446                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
8447                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
8448                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
8449                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
8450                 </fields>
8451                 <links>
8452                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
8453                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
8454                 </links>
8455         </class>
8456         <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">
8457                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
8458                         <field name="depth" reporter:datatype="int" />
8459                         <field name="grantable" reporter:datatype="bool"/>
8460                         <field name="grp" reporter:datatype="link"/>
8461                         <field name="id" reporter:datatype="id" />
8462                         <field name="perm" reporter:datatype="link"/>
8463                 </fields>
8464                 <links>
8465                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8466                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8467                 </links>
8468         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8469             <actions>
8470                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
8471                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
8472                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
8473                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
8474             </actions>
8475         </permacrud>
8476         </class>
8477         <class id="ccb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
8478                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8479                         <field name="items" oils_persist:virtual="true" />
8480                         <field name="btype" reporter:datatype="text"/>
8481                         <field name="id" reporter:datatype="id" />
8482                         <field name="name" reporter:datatype="text"/>
8483                         <field name="description" reporter:datatype="text"/>
8484                         <field name="owner" reporter:datatype="link"/>
8485                         <field name="pub" reporter:datatype="bool"/>
8486                         <field name="create_time" reporter:datatype="timestamp" />
8487                         <field name="owning_lib" reporter:datatype="org_unit" />
8488                 </fields>
8489                 <links>
8490                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8491                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8492                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8493                 </links>
8494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8495                         <actions>
8496                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8497                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8498                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8499                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8500                         </actions>
8501                 </permacrud>
8502         </class>
8503         <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">
8504                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8505                         <field name="id" reporter:datatype="id" />
8506                         <field name="bucket" reporter:datatype="link"/>
8507                         <field name="note" reporter:datatype="text" />
8508                 </fields>
8509                 <links>
8510                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8511                 </links>
8512         </class>
8513         <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">
8514                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8515                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8516                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8517                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8518                 </fields>
8519                 <links>
8520                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8521                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8522                 </links>
8523         </class>
8524         <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">
8525                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8526                         <field name="depth" reporter:datatype="int"/>
8527                         <field name="grantable" reporter:datatype="bool"/>
8528                         <field name="id" reporter:datatype="id" />
8529                         <field name="perm" reporter:datatype="link"/>
8530                         <field name="usr" reporter:datatype="link"/>
8531                 </fields>
8532                 <links>
8533                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8534                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8535                 </links>
8536         </class>
8537         <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">
8538                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8539                         <field name="object_id" reporter:datatype="text"/>
8540                         <field name="grantable" reporter:datatype="bool"/>
8541                         <field name="id" reporter:datatype="id" />
8542                         <field name="perm" reporter:datatype="link"/>
8543                         <field name="usr" reporter:datatype="link"/>
8544                         <field name="object_type" reporter:datatype="text"/>
8545                 </fields>
8546                 <links>
8547                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8548                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8549                 </links>
8550         </class>
8551         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8552                 <fields oils_persist:primary="id" oils_persist:sequence="">
8553                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8554                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8555                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8556                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8557                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8558                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8559                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8560                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8561                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8562                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8563                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8564                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8565                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8566                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8567                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8568                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8569                 </fields>
8570                 <links>
8571                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8572                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8573                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8574                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8575                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8576                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8577                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8578                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8579                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8580                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8581                 </links>
8582         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8583             <actions>
8584                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8585                     <context link="xact" jump="usr" field="home_ou"/>
8586                 </retrieve>
8587                         </actions>
8588                 </permacrud>
8589         </class>
8590         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8591                 oils_obj:fieldmapper="money::aged_payment" 
8592                 oils_persist:tablename="money.aged_payment" 
8593                 reporter:label="Payments: Aged">
8594                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8595                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8596                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8597                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8598                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8599                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8600                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8601                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8602                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8603                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8604                         <field name="billing" reporter:datatype="link"/>
8605                 </fields>
8606                 <links>
8607                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8608                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8609                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8610                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8611                 </links>
8612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8613                         <actions>
8614                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8615                                         <context link="xact" field="usr_home_ou"/>
8616                                 </retrieve>
8617                         </actions>
8618                 </permacrud>
8619         </class>
8620         <class id="mallp" controller="open-ils.cstore" 
8621                 oils_obj:fieldmapper="money::all_payments" 
8622                 oils_persist:tablename="money.all_payments" 
8623                 oils_persist="readonly" reporter:core="true"
8624                 reporter:label="Payments: All">
8625                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8626                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8627                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8628                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8629                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8630                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8631                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8632                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8633                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8634                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8635                         <field name="billing" reporter:datatype="link"/>
8636                 </fields>
8637                 <links>
8638                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8639                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8640                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8641                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8642                 </links>
8643         </class>
8644
8645         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
8646                 <fields oils_persist:primary="id" oils_persist:sequence="">
8647                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8648                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8649                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8650                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8651                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8652                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8653                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8654                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8655                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8656                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8657                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8658                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8659                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8660                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8661                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8662                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8663                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8664                 </fields>
8665                 <links>
8666                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8667                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8668                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8669                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8670                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8671                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8672                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8673                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8674                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8675                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8676                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8677                 </links>
8678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8679                         <actions>
8680                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8681                                         <context link="xact" jump="usr" field="home_ou"/>
8682                                 </retrieve>
8683                         </actions>
8684                 </permacrud>
8685         </class>
8686         <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">
8687                 <fields oils_persist:primary="id" oils_persist:sequence="">
8688                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8689                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8690                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8691                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8692                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8693                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8694                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8695                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8696                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8697                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8698                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8699                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8700                 </fields>
8701                 <links>
8702                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8703                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8704                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8705                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8706                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8707                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8708                 </links>
8709         </class>
8710         <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">
8711                 <fields oils_persist:primary="id" oils_persist:sequence="">
8712                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8713                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8714                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8715                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8716                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8717                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8718                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8719                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8720                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8721                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8722                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8723                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8724                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8725                 </fields>
8726                 <links>
8727                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8728                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8729                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8730                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8731                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8732                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8733                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8734                 </links>
8735         </class>
8736         <class id="cbrebi" controller="open-ils.cstore open-ils.pcrud" 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">
8737                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8738                         <field name="bucket" reporter:datatype="link"/>
8739                         <field name="id" reporter:datatype="id" />
8740                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8741                         <field name="create_time" reporter:datatype="timestamp" />
8742                         <field name="pos" reporter:datatype="int" />
8743                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8744                 </fields>
8745                 <links>
8746                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8747                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8748             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8749                 </links>
8750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8751                         <actions>
8752                                 <retrieve permission="ADMIN_COPY_BUCKET">
8753                     <context link="bucket" owning_lib="owning_lib"/>
8754                 </retrieve>
8755             </actions>
8756         </permacrud>
8757         </class>
8758         <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">
8759                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8760                         <field name="id" reporter:datatype="id" />
8761                         <field name="item" reporter:datatype="link"/>
8762                         <field name="note" reporter:datatype="text" />
8763                 </fields>
8764                 <links>
8765                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8766                 </links>
8767         </class>
8768         <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">
8769                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8770                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8771                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8772                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8773                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8774                 </fields>
8775                 <links>
8776                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8777                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8778                 </links>
8779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8780                         <actions>
8781                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8782                         </actions>
8783                 </permacrud>
8784         </class>
8785     <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">
8786         <fields oils_persist:primary="field">
8787             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8788             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8789             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8790         </fields>
8791         <links/>
8792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8793             <actions>
8794                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8795                 <retrieve />
8796                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8797                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8798             </actions>
8799         </permacrud>
8800     </class>
8801         <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">
8802                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8803                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8804                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8805                 </fields>
8806                 <links/>
8807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8808             <actions>
8809                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8810                 <retrieve/>
8811                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8812                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8813             </actions>
8814         </permacrud>
8815         </class>
8816
8817
8818         <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">
8819                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8820                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8821                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8822                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8823                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8824                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8825                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8826                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8827                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8828                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8829                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8830                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8831                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8832                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8833                 </fields>
8834                 <links>
8835                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8836                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8837                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8838                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8839                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8840                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8841                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8842                 </links>
8843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8844             <actions>
8845                 <create permission="TRANSIT_COPY">
8846                     <context link="target_copy" field="owner"/>
8847                 </create>
8848                 <retrieve/>
8849                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8850                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8851             </actions>
8852         </permacrud>
8853         </class>
8854         <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">
8855                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8856                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8857                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8858                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8859                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8860                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8861                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8862                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8863                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8864                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8865                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8866                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8867                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8868                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8869                 </fields>
8870                 <links>
8871                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8872                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8873                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8874                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8875                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8876                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8877                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8878                 </links>
8879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8880             <actions>
8881                 <create permission="TRANSIT_COPY" context_field="owner">
8882                     <context link="target_copy" field="circ_lib"/>
8883                 </create>
8884                 <retrieve/>
8885                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8886                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8887             </actions>
8888         </permacrud>
8889         </class>
8890         <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">
8891                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8892                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8893                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8894                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8895                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8896                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8897                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8898                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8899                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8900                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8901                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8902                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8903                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8904                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8905                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8906                 </fields>
8907                 <links>
8908                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8909                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8910                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8911                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8912                 </links>
8913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8914             <actions>
8915                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8916                     <context link="xact" jump="usr" field="home_ou"/>
8917                 </retrieve>
8918                         </actions>
8919                 </permacrud>
8920         </class>
8921         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8922                 oils_obj:fieldmapper="money::aged_billing" 
8923                 oils_persist:tablename="money.aged_billing" 
8924                 reporter:label="Aged Billing Line Item">
8925                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8926                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8927                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8928                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8929                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8930                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8931                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8932                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8933                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8934                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8935                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8936                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8937                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8938                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8939                 </fields>
8940                 <links>
8941                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8942                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8943                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8944                 </links>
8945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8946                         <actions>
8947                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8948                                         <context link="xact" field="usr_home_ou"/>
8949                                 </retrieve>
8950                         </actions>
8951                 </permacrud>
8952         </class>
8953         <class id="mallb" controller="open-ils.cstore" 
8954                 oils_obj:fieldmapper="money::all_billings" 
8955                 oils_persist:tablename="money.all_billings" 
8956                 oils_persist="readonly" reporter:label="All Billing Line Items">
8957                 <fields oils_persist:primary="id" oils_persist:sequence="">
8958                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8959                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8960                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8961                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8962                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8963                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8964                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8965                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8966                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8967                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8968                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8969                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8970                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8971                 </fields>
8972                 <links>
8973                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8974                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8975                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8976                 </links>
8977         </class>
8978         <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">
8979                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8980                         <field name="grp" />
8981                         <field name="id" reporter:datatype="id" />
8982                         <field name="usr" />
8983                 </fields>
8984                 <links>
8985                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8986                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8987                 </links>
8988         </class>
8989         <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">
8990                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8991                         <field name="id" reporter:datatype="id" />
8992                         <field name="fq_field" reporter:datatype="text"/>
8993                         <field name="identity_value" reporter:datatype="text"/>
8994                         <field name="translation" reporter:datatype="text"/>
8995                         <field name="string" reporter:datatype="text"/>
8996                 </fields>
8997                 <links>
8998                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8999                 </links>
9000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9001             <actions>
9002                 <create permission="CREATE_TRANSLATION" global_required="true"/>
9003                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
9004                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
9005                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
9006             </actions>
9007         </permacrud>
9008         </class>
9009         <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">
9010                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
9011                         <field name="id" reporter:datatype="id" />
9012                         <field name="fm_class" reporter:datatype="text"/>
9013                         <field name="field" reporter:datatype="text"/>
9014                         <field name="owner" reporter:datatype="org_unit"/>
9015                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
9016                 </fields>
9017                 <links>
9018                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9019                 </links>
9020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9021             <actions>
9022                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9023                 <retrieve/>
9024                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9025                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9026             </actions>
9027         </permacrud>
9028         </class>
9029         <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">
9030                 <fields oils_persist:primary="code">
9031                         <field name="code" reporter:datatype="id" />
9032                         <field name="marc_code" reporter:datatype="text"/>
9033                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
9034                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9035                         <field name="rtl" reporter:datatype="bool"/>
9036                 </fields>
9037                 <links/>
9038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9039             <actions>
9040                 <create permission="CREATE_LOCALE" global_required="true"/>
9041                 <retrieve/>
9042                 <update permission="UPDATE_LOCALE" global_required="true"/>
9043                 <delete permission="DELETE_LOCALE" global_required="true"/>
9044             </actions>
9045         </permacrud>
9046         </class>
9047         <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">
9048                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
9049                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
9050                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
9051                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
9052                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
9053                 </fields>
9054                 <links>
9055                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9056                 </links>
9057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9058             <actions>
9059                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
9060                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
9061                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
9062                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
9063             </actions>
9064         </permacrud>
9065         </class>
9066
9067         <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">
9068                 <fields oils_persist:primary="id">
9069                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9070                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9071                 </fields>
9072                 <links/>
9073         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9074             <actions>
9075                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9076                 <retrieve/>
9077                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9078                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9079             </actions>
9080         </permacrud>
9081         </class>
9082
9083         <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">
9084                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
9085                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9086                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9087                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9088                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9089                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9090                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9091                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9092                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9093                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9094                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9095                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9096                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9097                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9098                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9099                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9100                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9101                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9102                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9103                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9104                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9105                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9106                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9107                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9108                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9109                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9110                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9111                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9112                 </fields>
9113                 <links>
9114                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9115                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9116                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9117                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9118                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9119                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9120                 </links>
9121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9122             <actions>
9123                 <create permission="user_request.create">
9124                     <context link="usr" field="home_ou"/>
9125                                 </create>
9126                 <retrieve permission="user_request.view">
9127                     <context link="usr" field="home_ou"/>
9128                                 </retrieve>
9129                 <update permission="user_request.update">
9130                     <context link="usr" field="home_ou"/>
9131                                 </update>
9132                 <delete permission="user_request.delete">
9133                     <context link="usr" field="home_ou"/>
9134                                 </delete>
9135             </actions>
9136         </permacrud>
9137         </class>
9138
9139         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
9140         <oils_persist:source_definition><![CDATA[
9141             SELECT r.*, CASE
9142                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
9143                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
9144                         WHEN l.state = 'received' THEN 5 -- Received
9145                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
9146                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
9147                         WHEN l.id IS NOT NULL THEN 2 -- Pending
9148                         WHEN l.id IS NULL THEN 1 -- New
9149                         ELSE 0 -- Error
9150                     END AS request_status
9151                     ,u.home_ou
9152             FROM      acq.user_request r
9153             JOIN actor.usr u ON (r.usr = u.id)
9154             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
9155             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
9156             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
9157         ]]></oils_persist:source_definition>
9158                 <fields oils_persist:primary="id">
9159                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9160                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9161                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9162                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9163                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9164                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9165                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9166                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9167                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9168                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9169                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9170                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9171                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9172                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9173                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9174                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9175                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9176                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9177                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9178                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9179                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9180                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9181                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9182                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9183                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9184                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9185                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9186                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
9187                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
9188                 </fields>
9189                 <links>
9190                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9191                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9192                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9193                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9194                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9195                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9196                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
9197                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9198                 </links>
9199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9200             <actions>
9201                 <retrieve permission="user_request.view">
9202                     <context link="usr" field="home_ou"/>
9203                                 </retrieve>
9204             </actions>
9205         </permacrud>
9206         </class>
9207
9208         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
9209                 <fields oils_persist:primary="id">
9210                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9211                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9212                 </fields>
9213                 <links/>
9214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9215             <actions>
9216                 <retrieve/>
9217             </actions>
9218         </permacrud>
9219         </class>
9220
9221         <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">
9222                 <fields oils_persist:primary="code">
9223                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
9224                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9225                 </fields>
9226                 <links/>
9227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9228             <actions>
9229                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9230                 <retrieve/>
9231                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9232                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9233             </actions>
9234         </permacrud>
9235         </class>
9236
9237         <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">
9238                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
9239                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
9240                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
9241                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
9242                         <field reporter:label="Ratio" name="ratio" />
9243                 </fields>
9244                 <links>
9245                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
9246                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
9247                 </links>
9248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9249                         <actions>
9250                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9251                                 <retrieve/>
9252                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9253                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9254                         </actions>
9255                 </permacrud>
9256         </class>
9257
9258         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
9259                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
9260                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9261                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9262                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
9263                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
9264                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
9265                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
9266                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
9267                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
9268                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
9269                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9270                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9271                         <field reporter:label="URL" name="url" reporter:datatype="text" />
9272                         <field reporter:label="Email" name="email" reporter:datatype="text" />
9273                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
9274                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
9275                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
9276                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
9277                         <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
9278                         <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
9279                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
9280                         <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
9281                         <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9282                         <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
9283                 </fields>
9284                 <links>
9285                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9286                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9287                         <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
9288                         <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
9289                         <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
9290                         <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
9291                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
9292                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
9293                         <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
9294                         <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
9295                         <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
9296                 </links>
9297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9298             <actions>
9299                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
9300                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
9301                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
9302                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
9303             </actions>
9304         </permacrud>
9305         </class>
9306
9307         <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">
9308                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
9309                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9310                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9311                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9312                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9313                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9314                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9315                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9316                 </fields>
9317                 <links>
9318                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9319                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9320                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9321                 </links>
9322         </class>
9323
9324         <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">
9325                 <fields oils_persist:primary="code">
9326                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
9327                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9328                 </fields>
9329                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9330             <actions>
9331                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9332                 <retrieve/>
9333                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9334                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9335             </actions>
9336                 </permacrud>
9337         </class>
9338
9339         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
9340                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
9341                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
9342                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
9343                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9344                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
9345                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
9346                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
9347                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
9348                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
9349                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
9350                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
9351                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9352                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
9353                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
9354                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
9355                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
9356                 </fields>
9357                 <links>
9358                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
9359                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9360                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
9361                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
9362                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
9363                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
9364                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
9365                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
9366                 </links>
9367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9368             <actions>
9369                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
9370                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
9371                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
9372                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
9373             </actions>
9374         </permacrud>
9375         </class>
9376
9377         <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">
9378                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
9379                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9380                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9381                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9382                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
9383                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
9384                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
9385                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9386                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
9387                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9388                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9389                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9390                 </fields>
9391                 <links>
9392                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9393                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9394                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9395                 </links>
9396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9397             <actions>
9398                 <create   permission="ADMIN_INVOICE">
9399                                         <context link="invoice" field="receiver"/>
9400                                 </create>
9401                 <retrieve permission="ADMIN_INVOICE">
9402                                         <context link="invoice" field="receiver"/>
9403                                 </retrieve>
9404                 <update   permission="ADMIN_INVOICE">
9405                                         <context link="invoice" field="receiver"/>
9406                                 </update>
9407                                 <delete   permission="ADMIN_INVOICE">
9408                                         <context link="invoice" field="receiver"/>
9409                                 </delete>
9410             </actions>
9411         </permacrud>
9412         </class>
9413
9414         <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">
9415                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
9416                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9417                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9418                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9419                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9420                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
9421                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
9422                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9423                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9424                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9425                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9426                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9427                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9428                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
9429                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9430                 </fields>
9431                 <links>
9432                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9433                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9434                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9435                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9436                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9437                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
9438                 </links>
9439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9440             <actions>
9441                 <create   permission="ADMIN_INVOICE">
9442                                         <context link="invoice" field="receiver"/>
9443                                 </create>
9444                 <retrieve permission="ADMIN_INVOICE">
9445                                         <context link="invoice" field="receiver"/>
9446                                 </retrieve>
9447                 <update   permission="ADMIN_INVOICE">
9448                                         <context link="invoice" field="receiver"/>
9449                                 </update>
9450                                 <delete   permission="ADMIN_INVOICE">
9451                                         <context link="invoice" field="receiver"/>
9452                                 </delete>
9453             </actions>
9454         </permacrud>
9455         </class>
9456
9457         <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">
9458                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
9459                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
9460                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9461                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9462                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9463                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9464                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9465                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text" oils_obj:required="true"/>
9466                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9467                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9468                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
9469                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
9470                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9471                 </fields>
9472                 <links>
9473                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9474                 </links>
9475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9476             <actions>
9477                 <create permission="ADMIN_PROVIDER">
9478                     <context link="provider" field="owner"/>
9479                 </create>
9480                 <retrieve permission="ADMIN_PROVIDER">
9481                     <context link="provider" field="owner"/>
9482                 </retrieve>
9483                 <update permission="ADMIN_PROVIDER">
9484                     <context link="provider" field="owner"/>
9485                 </update>
9486                 <delete permission="ADMIN_PROVIDER">
9487                     <context link="provider" field="owner"/>
9488                 </delete>
9489             </actions>
9490         </permacrud>
9491         </class>
9492
9493         <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">
9494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9495                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9496                         <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
9497                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9498                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9499                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9500                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9501                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
9502         </fields>
9503                 <links>
9504                         <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
9505                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9506                 </links>
9507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9508             <actions>
9509                 <create permission="ADMIN_PROVIDER">
9510                     <context link="provider" field="owner"/>
9511                 </create>
9512                 <retrieve permission="ADMIN_PROVIDER">
9513                     <context link="provider" field="owner"/>
9514                 </retrieve>
9515                 <update permission="ADMIN_PROVIDER">
9516                     <context link="provider" field="owner"/>
9517                 </update>
9518                 <delete permission="ADMIN_PROVIDER">
9519                     <context link="provider" field="owner"/>
9520                 </delete>
9521             </actions>
9522         </permacrud>
9523     </class>
9524         <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">
9525                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9526                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9527                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9528                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9529                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9530                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9531                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
9532                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9533                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9534                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9535                         <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
9536                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9537                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9538                 </fields>
9539                 <links>
9540                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9541                 </links>
9542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9543             <actions>
9544                 <create permission="ADMIN_PROVIDER">
9545                     <context link="contact" jump='provider' field="owner"/>
9546                 </create>
9547                 <retrieve permission="ADMIN_PROVIDER">
9548                     <context link="contact" jump='provider' field="owner"/>
9549                 </retrieve>
9550                 <update permission="ADMIN_PROVIDER">
9551                     <context link="contact" jump='provider' field="owner"/>
9552                 </update>
9553                 <delete permission="ADMIN_PROVIDER">
9554                     <context link="contact" jump='provider' field="owner"/>
9555                 </delete>
9556             </actions>
9557         </permacrud>
9558         </class>
9559
9560         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9561                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9562                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9563                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9564                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9565                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9566                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9567                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9568                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9569                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9570                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9571                 </fields>
9572                 <links>
9573                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9574                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9575                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9576                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9577                 </links>
9578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9579             <actions>
9580                 <create permission="ADMIN_ACQ_FUND">
9581                     <context link="src_fund" field="org"/>
9582                 </create>
9583                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9584                     <context link="src_fund" field="org"/>
9585                     <context link="dest_fund" field="org"/>
9586                 </retrieve>
9587                 <update permission="ADMIN_ACQ_FUND">
9588                     <context link="src_fund" field="org"/>
9589                 </update>
9590                 <delete permission="ADMIN_ACQ_FUND">
9591                     <context link="src_fund" field="org"/>
9592                 </delete>
9593             </actions>
9594         </permacrud>
9595         </class>
9596
9597         <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">
9598                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9599                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9600                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9601                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9602                 </fields>
9603                 <links>
9604             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9605                 </links>
9606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9607                         <actions>
9608                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9609                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9610                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9611                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9612                         </actions>
9613                 </permacrud>
9614         </class>
9615
9616         <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">
9617                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9618                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9619                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9620                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9621                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9622                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9623                 </fields>
9624                 <links>
9625                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9626                 </links>
9627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9628                         <actions>
9629                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9630                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9631                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9632                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9633                         </actions>
9634                 </permacrud>
9635         </class>
9636
9637         <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">
9638                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9639                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9640                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
9641                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true" />
9642                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true" />
9643                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9644                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true" />
9645                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9646                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9647                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9648                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9649                 </fields>
9650                 <links>
9651                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9652                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9653             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9654             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9655                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9656                 </links>
9657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9658             <actions>
9659                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9660                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9661                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9662                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9663             </actions>
9664         </permacrud>
9665         </class>
9666
9667         <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">
9668                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9669                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9670                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9671                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9672                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9673                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9674                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9675                 </fields>
9676                 <links>
9677                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9678                 </links>
9679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9680                         <actions>
9681                                 <create permission="ADMIN_FUNDING_SOURCE">
9682                     <context link="funding_source" field="owner"/>
9683                 </create>
9684                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9685                     <context link="funding_source" field="owner"/>
9686                 </retrieve>
9687                                 <update permission="ADMIN_FUNDING_SOURCE">
9688                     <context link="funding_source" field="owner"/>
9689                 </update>
9690                                 <delete permission="ADMIN_FUNDING_SOURCE">
9691                     <context link="funding_source" field="owner"/>
9692                 </delete>
9693                         </actions>
9694                 </permacrud>
9695         </class>
9696
9697         <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">
9698                 <fields oils_persist:primary="id">
9699                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9700                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9701                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9702                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9703                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9704                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9705                 </fields>
9706                 <links>
9707                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9708                 </links>
9709         </class>
9710
9711         <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">
9712                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9713                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9714                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9715                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9716                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9717                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9718                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9719                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9720                         <field reporter:label="Debit Time" name="create_time" reporter:datatype="timestamp" />
9721                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9722                         <field reporter:label="Invoice Items" name="invoice_items" reporter:datatype="link" oils_persist:virtual="true"/>
9723                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9724                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9725                 </fields>
9726                 <links>
9727                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9728                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9729                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9730                         <link field="invoice_items" reltype="has_many" key="fund_debit" map="" class="acqii"/>
9731                         <link field="po_items" reltype="has_many" key="fund_debit" map="" class="acqpoi"/>
9732                         <link field="lineitem_details" reltype="has_many" key="fund_debit" map="" class="acqlid"/>
9733                 </links>
9734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9735                         <actions>
9736                                 <create permission="ADMIN_ACQ_FUND">
9737                     <context link="fund" field="org"/>
9738                 </create>
9739                                 <retrieve permission="ADMIN_ACQ_FUND">
9740                     <context link="fund" field="org"/>
9741                 </retrieve>
9742                                 <update permission="ADMIN_ACQ_FUND">
9743                     <context link="fund" field="org"/>
9744                 </update>
9745                                 <delete permission="ADMIN_ACQ_FUND">
9746                     <context link="fund" field="org"/>
9747                 </delete>
9748                         </actions>
9749                 </permacrud>
9750         </class>
9751
9752         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9753                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9754                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9755                         <field reporter:label="Owner" name="org" reporter:datatype="org_unit" oils_obj:required="true" />
9756                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
9757                         <field reporter:label="Year" name="year" reporter:datatype="int" oils_obj:required="true" />
9758                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" oils_obj:required="true" />
9759                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9760                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9761                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9762                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9763                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9764                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9765                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9766                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9767                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9768                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9769                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9770                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9771                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9772                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9773                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9774                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9775                 </fields>
9776                 <links>
9777                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9778                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9779             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9780             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9781             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9782             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9783             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9784             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9785             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9786             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9787             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9788                 </links>
9789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9790             <actions>
9791                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9792                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9793                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9794                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9795             </actions>
9796         </permacrud>
9797         </class>
9798
9799         <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">
9800                 <fields oils_persist:primary="fund">
9801                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9802                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9803                 </fields>
9804                 <links>
9805                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9806                 </links>
9807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9808             <actions>
9809                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9810                                         <context link="fund" field="org" />
9811                 </retrieve>
9812             </actions>
9813         </permacrud>
9814         </class>
9815
9816         <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">
9817                 <fields oils_persist:primary="fund">
9818                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9819                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9820                 </fields>
9821                 <links>
9822                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9823                 </links>
9824         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9825             <actions>
9826                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9827                                         <context link="fund" field="org" />
9828                 </retrieve>
9829             </actions>
9830         </permacrud>
9831         </class>
9832
9833         <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">
9834                 <fields oils_persist:primary="fund">
9835                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9836                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9837                 </fields>
9838                 <links>
9839                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9840                 </links>
9841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9842             <actions>
9843                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9844                                         <context link="fund" field="org" />
9845                 </retrieve>
9846             </actions>
9847         </permacrud>
9848         </class>
9849
9850         <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">
9851                 <fields oils_persist:primary="fund">
9852                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9853                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9854                 </fields>
9855                 <links>
9856                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9857                 </links>
9858         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9859             <actions>
9860                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9861                                         <context link="fund" field="org" />
9862                 </retrieve>
9863             </actions>
9864         </permacrud>
9865         </class>
9866
9867         <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">
9868                 <fields oils_persist:primary="fund">
9869                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9870                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9871                 </fields>
9872                 <links>
9873                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9874                 </links>
9875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9876             <actions>
9877                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9878                                         <context link="fund" field="org" />
9879                 </retrieve>
9880             </actions>
9881         </permacrud>
9882         </class>
9883
9884    <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">
9885         <fields oils_persist:primary="fund">
9886             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9887             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9888         </fields>
9889         <links>
9890             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9891         </links>
9892     </class>
9893
9894    <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">
9895         <fields oils_persist:primary="fund">
9896             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9897             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9898         </fields>
9899         <links>
9900             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9901         </links>
9902     </class>
9903
9904    <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">
9905         <fields oils_persist:primary="fund">
9906             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9907             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9908         </fields>
9909         <links>
9910             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9911         </links>
9912     </class>
9913
9914    <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">
9915         <fields oils_persist:primary="fund">
9916             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9917             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9918         </fields>
9919         <links>
9920             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9921         </links>
9922     </class>
9923
9924    <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">
9925         <fields oils_persist:primary="fund">
9926             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9927             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9928         </fields>
9929         <links>
9930             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9931         </links>
9932     </class>
9933
9934         <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">
9935                 <fields oils_persist:primary="funding_source">
9936                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9937                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9938                 </fields>
9939                 <links>
9940                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9941                 </links>
9942         </class>
9943
9944         <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">
9945                 <fields oils_persist:primary="funding_source">
9946                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9947                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9948                 </fields>
9949                 <links>
9950                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9951                 </links>
9952         </class>
9953
9954         <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">
9955                 <fields oils_persist:primary="funding_source">
9956                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9957                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9958                 </fields>
9959                 <links>
9960                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9961                 </links>
9962         </class>
9963
9964         <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">
9965                 <fields oils_persist:primary="fund">
9966                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9967                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9968                 </fields>
9969                 <links>
9970                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9971                 </links>
9972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9973             <actions>
9974                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9975                                         <context link="fund" field="org" />
9976                 </retrieve>
9977             </actions>
9978         </permacrud>
9979     </class>
9980     <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">
9981         <oils_persist:source_definition><![CDATA[
9982             SELECT
9983                 acqf.*,
9984                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9985                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9986                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9987                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9988             FROM
9989                 acq.fund acqf
9990                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9991                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9992                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9993                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9994         ]]></oils_persist:source_definition>
9995         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9996             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9997             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
9998             <field reporter:label="Name" name="name" reporter:datatype="text" />
9999             <field reporter:label="Year" name="year" reporter:datatype="int" />
10000             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
10001             <field reporter:label="Code" name="code" reporter:datatype="text" />
10002             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
10003             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
10004             <field reporter:label="Active" name="active" reporter:datatype="bool" />
10005             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
10006             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
10007
10008             <!-- non fund-native fields -->
10009             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
10010             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
10011             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
10012             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
10013         </fields>
10014         <links>
10015             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
10016             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10017             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
10018         </links>
10019         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10020             <actions>
10021                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
10022             </actions>
10023         </permacrud>
10024         </class>
10025         <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">
10026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
10027                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
10028                         <field reporter:label="Fund" name="fund" reporter:datatype="link" oils_obj:required="true" />
10029                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
10030                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
10031                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" oils_obj:required="true" />
10032                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10033                         <field reporter:label="Allocation Time" name="create_time" reporter:datatype="timestamp" />
10034                 </fields>
10035                 <links>
10036                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
10037                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10038                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
10039                 </links>
10040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10041                         <actions>
10042                                 <create permission="ADMIN_ACQ_FUND">
10043                     <context link="fund" field="org"/>
10044                 </create>
10045                                 <retrieve permission="ADMIN_ACQ_FUND">
10046                     <context link="fund" field="org"/>
10047                 </retrieve>
10048                                 <update permission="ADMIN_ACQ_FUND">
10049                     <context link="fund" field="org"/>
10050                 </update>
10051                                 <delete permission="ADMIN_ACQ_FUND">
10052                     <context link="fund" field="org"/>
10053                 </delete>
10054                         </actions>
10055                 </permacrud>
10056         </class>
10057
10058     <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">
10059         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
10060             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
10061             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
10062             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
10063             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
10064             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
10065             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
10066             <field reporter:label="Note" name="note" reporter:datatype="text" />
10067             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
10068         </fields>
10069         <links>
10070             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
10071             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10072             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
10073         </links>
10074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10075                         <actions>
10076                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10077                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10078                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10079                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10080                         </actions>
10081                 </permacrud>
10082     </class>
10083
10084         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
10085                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
10086                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
10087                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10088                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
10089                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
10090                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10091                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10092                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
10093                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
10094                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10095                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10096                 </fields>
10097                 <links>
10098                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10099                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10100                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10101                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10102                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
10103                 </links>
10104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10105                         <actions>
10106                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
10107                         </actions>
10108                 </permacrud>
10109         </class>
10110
10111         <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">
10112                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
10113                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
10114                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
10115                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10116                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
10117                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
10118                 </fields>
10119                 <links>
10120                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10121                 </links>
10122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10123                         <actions>
10124                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10125                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
10126                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10127                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10128                         </actions>
10129                 </permacrud>
10130         </class>
10131
10132         <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">
10133                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
10134                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
10135                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10136                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10137                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10138                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10139                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10140                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
10141                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10142                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10143                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
10144                         <field reporter:label="Name" name="name" reporter:datatype="text" />
10145                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10146                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10147                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
10148                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
10149                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
10150                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
10151                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
10152                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
10153                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
10154                 </fields>
10155                 <links>
10156                         <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
10157                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10158                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10159                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10160                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
10161                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10162                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
10163                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
10164                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
10165                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10166                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10167                 </links>
10168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10169                         <actions>
10170                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10171                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10172                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10173                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10174                         </actions>
10175                 </permacrud>
10176         </class>
10177
10178         <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">
10179                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
10180                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10181                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10182                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10183                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10184                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10185                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10186                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10187                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10188                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10189                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10190                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10191                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10192                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
10193                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10194                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10195                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10196                 </fields>
10197                 <links>
10198                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10199                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10200                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10201                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10202                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10203                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10204                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10205                 </links>
10206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10207             <actions>
10208                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10209             </actions>
10210                 </permacrud>
10211         </class>
10212
10213         <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">
10214                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
10215                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
10216                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10217                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10218                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10219                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10220                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10221                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
10222                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10223                 </fields>
10224                 <links>
10225                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10226                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10227                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10228                 </links>
10229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10230             <actions>
10231                 <create permission="CREATE_PURCHASE_ORDER">
10232                     <context link="purchase_order" field="ordering_agency"/>
10233                 </create>
10234                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10235                     <context link="purchase_order" field="ordering_agency"/>
10236                 </retrieve>
10237                 <update permission="CREATE_PURCHASE_ORDER">
10238                     <context link="purchase_order" field="ordering_agency"/>
10239                 </update>
10240                 <delete permission="CREATE_PURCHASE_ORDER">
10241                     <context link="purchase_order" field="ordering_agency"/>
10242                 </delete>
10243             </actions>
10244                 </permacrud>
10245         </class>
10246
10247         <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">
10248                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
10249                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10250                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10251                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10252                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
10253                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
10254                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
10255                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10256                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
10257                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10258                         <field reporter:label="Target" name="target" reporter:datatype="int" />
10259                 </fields>
10260                 <links>
10261                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10262                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10263                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
10264                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10265                 </links>
10266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10267             <actions>
10268                 <create permission="CREATE_PURCHASE_ORDER">
10269                     <context link="purchase_order" field="ordering_agency"/>
10270                 </create>
10271                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10272                     <context link="purchase_order" field="ordering_agency"/>
10273                 </retrieve>
10274                 <update permission="CREATE_PURCHASE_ORDER">
10275                     <context link="purchase_order" field="ordering_agency"/>
10276                 </update>
10277                 <delete permission="CREATE_PURCHASE_ORDER">
10278                     <context link="purchase_order" field="ordering_agency"/>
10279                 </delete>
10280             </actions>
10281                 </permacrud>
10282         </class>
10283
10284         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
10285                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
10286                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
10287                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
10288                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
10289                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10290                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10291                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10292                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10293                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
10294                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
10295                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
10296                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
10297                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10298                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10299                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10300                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
10301                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10302                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10303                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10304                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
10305                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
10306                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
10307                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
10308                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
10309                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
10310                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
10311                 </fields>
10312                 <links>
10313                         <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
10314                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10315                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10316                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10317                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10318                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10319                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10320                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10321                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
10322                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
10323                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
10324                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10325                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
10326                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10327                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
10328                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
10329                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10330                 </links>
10331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10332                         <actions>
10333                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10334                                         <context link="purchase_order" field="ordering_agency"/>
10335                                         <context link="picklist" field="org_unit"/>
10336                                 </retrieve>
10337                         </actions>
10338                 </permacrud>
10339         </class>
10340
10341         <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">
10342                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
10343                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10344                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10345                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10346                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
10347                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10348                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10349                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
10350                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10351                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10352                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
10353                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
10354                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10355                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10356                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
10357                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
10358                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
10359                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10360                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
10361                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10362                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10363                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10364                 </fields>
10365                 <links>
10366                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
10367                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10368                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10369                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10370                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10371                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10372                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10373                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10374                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10375                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10376                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10377                 </links>
10378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10379                         <actions>
10380                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10381                                         <context link="purchase_order" field="ordering_agency"/>
10382                                         <context link="picklist" field="org_unit"/>
10383                                 </retrieve>
10384                         </actions>
10385                 </permacrud>
10386         </class>
10387
10388         <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">
10389                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
10390                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
10391                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10392                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10393                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10394                 </fields>
10395                 <links>
10396                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10397                 </links>
10398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10399                         <actions>
10400                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10401                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
10402                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10403                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10404                         </actions>
10405                 </permacrud>
10406         </class>
10407
10408         <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">
10409                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
10410                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
10411                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
10412                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10413                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10414                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10415                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10416                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
10417                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
10418                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10419                 </fields>
10420                 <links>
10421                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10422                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10423                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10424                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
10425                 </links>
10426         </class>
10427
10428         <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">
10429                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
10430                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
10431                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
10432                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
10433                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
10434                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
10435                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
10436                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
10437                 </fields>
10438                 <links>
10439                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10440                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
10441                 </links>
10442         </class>
10443
10444         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
10445                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
10446                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
10447                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
10448                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
10449                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
10450                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
10451                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
10452                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
10453                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
10454                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
10455                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10456                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
10457                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
10458                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10459                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
10460                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10461                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
10462                 </fields>
10463                 <links>
10464                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10465                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
10466                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10467                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10468                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10469                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10470                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10471                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10472                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
10473                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
10474                 </links>
10475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10476             <actions>
10477                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10478                     <context link="lineitem" jump="purchase_order" field="ordering_agency"/>
10479                     <context link="lineitem" jump="picklist" field="org_unit"/>
10480                 </retrieve>
10481             </actions>
10482         </permacrud>
10483         </class>
10484
10485         <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">
10486                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10487                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10488                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10490                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10491                 </fields>
10492                 <links/>
10493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10494                         <actions>
10495                                 <retrieve />
10496                         </actions>
10497                 </permacrud>
10498         </class>
10499
10500         <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">
10501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10502                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10503                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10504                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10505                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10506                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10507             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10508                 </fields>
10509                 <links/>
10510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10511             <actions>
10512                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10513                 <retrieve />
10514                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10515                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10516             </actions>
10517         </permacrud>
10518         </class>
10519
10520         <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">
10521                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10522                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10523                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10524                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10525                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10526                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10527                 </fields>
10528                 <links/>
10529         </class>
10530         <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">
10531                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10532                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10533                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10534                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10535                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10536                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10537                 </fields>
10538                 <links>
10539                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10540                 </links>
10541         </class>
10542
10543         <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">
10544             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10545                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10546                 <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true" />
10547                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
10548                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
10549                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10550                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10551         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10552
10553             </fields>
10554             <links>
10555                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10556             </links>
10557             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10558                 <actions>
10559                     <create permission="ADMIN_PROVIDER">
10560                         <context link="provider" field="owner"/>
10561                     </create>
10562                     <retrieve permission="ADMIN_PROVIDER">
10563                         <context link="provider" field="owner"/>
10564                     </retrieve>
10565                     <update permission="ADMIN_PROVIDER">
10566                         <context link="provider" field="owner"/>
10567                     </update>
10568                     <delete permission="ADMIN_PROVIDER">
10569                         <context link="provider" field="owner"/>
10570                     </delete>
10571                 </actions>
10572             </permacrud>
10573         </class>
10574         
10575         <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">
10576             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10577                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10578                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10579                 <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
10580                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
10581             </fields>
10582             <links>
10583                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10584             </links>
10585             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10586                 <actions>
10587                     <create permission="ADMIN_PROVIDER">
10588                         <context link="provider" field="owner"/>
10589                     </create>
10590                     <retrieve permission="ADMIN_PROVIDER">
10591                         <context link="provider" field="owner"/>
10592                     </retrieve>
10593                     <update permission="ADMIN_PROVIDER">
10594                         <context link="provider" field="owner"/>
10595                     </update>
10596                     <delete permission="ADMIN_PROVIDER">
10597                         <context link="provider" field="owner"/>
10598                     </delete>
10599                 </actions>
10600             </permacrud>
10601         </class>
10602         
10603         <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">
10604             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10605                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10606                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10607                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10608                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10609                 </fields>
10610                 <links/>
10611         </class>
10612
10613         <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">
10614                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10615                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10616                         <field name="label"         reporter:datatype="text"      reporter:label="Label" oils_obj:required="true"/>
10617                         <field name="host"          reporter:datatype="text"      reporter:label="Host" oils_obj:required="true"/>
10618                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10619                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10620                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10621                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10622                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner" oils_obj:required="true"/>
10623                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10624                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider" oils_obj:required="true"/>
10625                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10626                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10627                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10628                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10629                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes" oils_obj:required="true"/>
10630                 </fields>
10631                 <links>
10632                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10633                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10634                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10635                 </links>
10636         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10637             <actions>
10638                 <create permission="ADMIN_PROVIDER">
10639                     <context link="provider" field="owner"/>
10640                 </create>
10641                 <retrieve permission="ADMIN_PROVIDER">
10642                     <context link="provider" field="owner"/>
10643                 </retrieve>
10644                 <update permission="ADMIN_PROVIDER">
10645                     <context link="provider" field="owner"/>
10646                 </update>
10647                 <delete permission="ADMIN_PROVIDER">
10648                     <context link="provider" field="owner"/>
10649                 </delete>
10650             </actions>
10651         </permacrud>
10652         </class>
10653
10654         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10655                 oils_obj:fieldmapper="acq::edi_attr" 
10656                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10657                 <fields oils_persist:primary="key">
10658                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10659                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10660                 </fields>
10661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10662             <actions>
10663                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10664                 <retrieve/>
10665                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10666                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10667             </actions>
10668         </permacrud>
10669         </class>
10670         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10671                 oils_obj:fieldmapper="acq::edi_attr_set" 
10672                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10674                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10675                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10676                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10677                         <field name="edi_accounts" reporter:datatype="link" oils_persist:virtual="true" reporter:label="EDI Accounts"/>
10678                 </fields>
10679                 <links>
10680                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10681                         <link field="edi_accounts" reltype="has_many" key="attr_set" map="" class="acqedi"/>
10682                 </links>
10683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10684             <actions>
10685                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10686                 <retrieve/>
10687                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10688                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10689             </actions>
10690         </permacrud>
10691         </class>
10692         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10693                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10694                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10695                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10696                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10697                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10698                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10699                 </fields>
10700                 <links>
10701                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10702                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10703                 </links>
10704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10705             <actions>
10706                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10707                 <retrieve/>
10708                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10709                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10710             </actions>
10711         </permacrud>
10712         </class>
10713
10714
10715         <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">
10716                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10717                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10718                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10719                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10720                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10721                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10722                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10723                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10724                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10725                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10726                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10727                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10728                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10729                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10730                 </fields>
10731                 <links>
10732                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10733                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10734                 </links>
10735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10736             <actions>
10737                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10738                     <context link="account" jump="provider" field="owner"/>
10739                 </retrieve>
10740                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10741                     <context link="account" jump="provider" field="owner"/>
10742                 </update>
10743                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10744                     <context link="account" jump="provider" field="owner"/>
10745                 </delete>
10746             </actions>
10747         </permacrud>
10748         </class>
10749
10750
10751         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10752                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10753                         <field name="id" reporter:datatype="id" />
10754                         <field name="parent" reporter:datatype="link"/>
10755                         <field name="owner" reporter:datatype="link"/>
10756                         <field name="create_time" reporter:datatype="timestamp"/>
10757                         <field name="name" reporter:datatype="text"/>
10758                         <field name="shared" reporter:datatype="bool"/>
10759                         <field name="share_with" reporter:datatype="link"/>
10760                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10761                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10762                 </fields>
10763                 <links>
10764                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10765                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10766                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10767                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10768                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10769                 </links>
10770         </class>
10771         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10772                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10773                         <field name="id" reporter:datatype="id" />
10774                         <field name="parent" reporter:datatype="link"/>
10775                         <field name="owner" reporter:datatype="link"/>
10776                         <field name="create_time" reporter:datatype="timestamp"/>
10777                         <field name="name" reporter:datatype="text"/>
10778                         <field name="shared" reporter:datatype="bool"/>
10779                         <field name="share_with" reporter:datatype="link"/>
10780                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10781                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10782                 </fields>
10783                 <links>
10784                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10785                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10786                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10787                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10788                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10789                 </links>
10790         </class>
10791         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10792                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10793                         <field name="id" reporter:datatype="id" />
10794                         <field name="parent" reporter:datatype="link"/>
10795                         <field name="owner" reporter:datatype="link"/>
10796                         <field name="create_time" reporter:datatype="timestamp"/>
10797                         <field name="name" reporter:datatype="text"/>
10798                         <field name="shared" reporter:datatype="bool"/>
10799                         <field name="share_with" reporter:datatype="link"/>
10800                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10801                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10802                 </fields>
10803                 <links>
10804                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10805                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10806                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10807                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10808                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10809                 </links>
10810         </class>
10811         <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">
10812                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10813                         <field name="id" reporter:datatype="id" />
10814                         <field name="owner" reporter:datatype="link"/>
10815                         <field name="create_time" reporter:datatype="timestamp"/>
10816                         <field name="name" reporter:datatype="text"/>
10817                         <field name="data" reporter:datatype="text"/>
10818                         <field name="folder" reporter:datatype="link"/>
10819                         <field name="description" reporter:datatype="text"/>
10820                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10821                 </fields>
10822                 <links>
10823                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10824                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10825                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10826                 </links>
10827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10828             <actions>
10829                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10830                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10831                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10832                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10833             </actions>
10834         </permacrud>
10835         </class>
10836         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10837                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10838                         <field name="id" reporter:datatype="id" />
10839                         <field name="owner" reporter:datatype="link"/>
10840                         <field name="create_time" reporter:datatype="timestamp"/>
10841                         <field name="template" reporter:datatype="link"/>
10842                         <field name="data" reporter:datatype="text"/>
10843                         <field name="folder" reporter:datatype="link"/>
10844                         <field name="recur" reporter:datatype="bool"/>
10845                         <field name="recurrence" reporter:datatype="interval"/>
10846                         <field name="name" reporter:datatype="text"/>
10847                         <field name="description" reporter:datatype="text"/>
10848                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10849                 </fields>
10850                 <links>
10851                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10852                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10853                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10854                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10855                 </links>
10856         </class>
10857         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10858                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10859                         <field name="id" reporter:datatype="id" />
10860                         <field name="runner" reporter:datatype="link"/>
10861                         <field name="start_time" reporter:datatype="timestamp"/>
10862                         <field name="complete_time" reporter:datatype="timestamp"/>
10863                         <field name="run_time" reporter:datatype="timestamp"/>
10864                         <field name="email" reporter:datatype="text"/>
10865                         <field name="excel_format" reporter:datatype="bool"/>
10866                         <field name="csv_format" reporter:datatype="bool"/>
10867                         <field name="html_format" reporter:datatype="bool"/>
10868                         <field name="error_code" reporter:datatype="int"/>
10869                         <field name="error_text" reporter:datatype="text"/>
10870                         <field name="report" reporter:datatype="link"/>
10871                         <field name="folder" reporter:datatype="link"/>
10872                         <field name="chart_pie" reporter:datatype="bool"/>
10873                         <field name="chart_bar" reporter:datatype="bool"/>
10874                         <field name="chart_line" reporter:datatype="bool"/>
10875                 </fields>
10876                 <links>
10877                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10878                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10879                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10880                 </links>
10881         </class>
10882         <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">
10883                 <fields oils_persist:primary="id">
10884                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10885                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10886                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10887                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10888                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10889                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10890                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10891                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10892                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10893                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10894                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10895                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10896                 </fields>
10897                 <links>
10898                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10899                 </links>
10900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10901                         <actions>
10902                                 <retrieve />
10903                         </actions>
10904                 </permacrud>
10905         </class>
10906         <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">
10907                 <fields oils_persist:primary="id">
10908                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10909                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10910                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10911                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10912                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10913                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10914                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10915                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10916                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10917                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10918                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10919                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10920                 </fields>
10921                 <links>
10922                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10923                 </links>
10924         </class>
10925         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10926                 <fields oils_persist:primary="id">
10927                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10928                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10929                         <field reporter:label="Fingerprint" name="fingerprint" />
10930                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10931                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10932                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10933                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10934                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10935                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10936                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10937                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10938                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10939                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10940                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10941                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10942                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10943                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10944                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10945                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10946                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10947                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10948                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10949                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10950                 </fields>
10951                 <links>
10952                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10953                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10954                 </links>
10955         </class>
10956         <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">
10957                 <fields oils_persist:primary="id">
10958                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10959                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10960                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10961                 </fields>
10962                 <links>
10963                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10964                 </links>
10965         </class>
10966         <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">
10967                 <fields oils_persist:primary="id">
10968                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10969                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10970                 </fields>
10971                 <links>
10972                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10973                 </links>
10974         </class>
10975         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
10976                 <fields oils_persist:primary="id">
10977                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10978                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10979                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10980                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10981                 </fields>
10982                 <links>
10983                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10984                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10985                 </links>
10986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10987                         <actions>
10988                                 <retrieve permission="VIEW_HOLD">
10989                                         <context link="id" field="pickup_lib"/>
10990                                 </retrieve>
10991                         </actions>
10992                 </permacrud>
10993         </class>
10994         <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">
10995                 <fields oils_persist:primary="xact">
10996                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10997                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10998                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10999                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
11000                 </fields>
11001                 <links>
11002                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
11003                 </links>
11004         </class>
11005         <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">
11006                 <fields oils_persist:primary="xact">
11007                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
11008                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
11009                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
11010                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
11011                 </fields>
11012                 <links>
11013                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
11014                 </links>
11015         </class>
11016         <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)">
11017                 <fields oils_persist:primary="id">
11018                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
11019                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
11020                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
11021                 </fields>
11022                 <links>
11023                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11024                 </links>
11025         </class>
11026         <class id="erfcc" controller="open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
11027                 <fields oils_persist:primary="id">
11028                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
11029                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
11030                 </fields>
11031                 <links>
11032                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11033                 </links>
11034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11035                         <actions>
11036                                 <retrieve permission="STAFF_LOGIN">
11037                                         <context link="id" field="circ_lib"/>
11038                                 </retrieve>
11039                         </actions>
11040                 </permacrud>
11041         </class>
11042         <class id="erccpo" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::copy_count_per_org" oils_persist:tablename="extend_reporter.copy_count_per_org" reporter:label="Library Holdings Count with Deleted">
11043                 <fields oils_persist:primary="bibid">
11044                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
11045                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
11046                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
11047                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
11048                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
11049                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
11050                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
11051                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
11052                 </fields>
11053                 <links>
11054                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
11055                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11056                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11057                 </links>
11058         </class>
11059         <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">
11060                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
11061                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
11062                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
11063                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
11064                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
11065                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
11066                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
11067                 </fields>
11068                 <links>
11069                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11070                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
11071                 </links>
11072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11073                         <actions>
11074                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11075                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11076                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11077                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11078                         </actions>
11079                 </permacrud>
11080         </class>
11081         <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">
11082                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
11083                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
11084                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
11085                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
11086                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11087                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11088                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
11089                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
11090                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
11091                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
11092                 </fields>
11093                 <links>
11094                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11095                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11096                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
11097                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11098                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
11099                 </links>
11100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11101                         <actions>
11102                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
11103                                         <context link="formula" field="owner"/>
11104                                 </create>
11105                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
11106                                         <context link="formula" field="owner"/>
11107                                 </retrieve>
11108                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
11109                                         <context link="formula" field="owner"/>
11110                                 </update>
11111                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
11112                                         <context link="formula" field="owner"/>
11113                                 </delete>
11114                         </actions>
11115                 </permacrud>
11116         </class>
11117
11118         <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">
11119                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
11120                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11121                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11122                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11123                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
11124                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11125                 </fields>
11126                 <links>
11127                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11128                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11129                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11130                 </links>
11131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11132                         <actions>
11133                                 <create permission="CREATE_PURCHASE_ORDER">
11134                                         <context link="formula" field="owner"/>
11135                 </create>
11136                                 <retrieve permission="CREATE_PURCHASE_ORDER">
11137                                         <context link="formula" field="owner"/>
11138                 </retrieve>
11139                                 <update permission="CREATE_PURCHASE_ORDER">
11140                                         <context link="formula" field="owner"/>
11141                 </update>
11142                                 <delete permission="CREATE_PURCHASE_ORDER">
11143                                         <context link="formula" field="owner"/>
11144                 </delete>
11145                         </actions>
11146                 </permacrud>
11147         </class>
11148
11149         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
11150                 <fields oils_persist:primary="id">
11151                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
11152                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
11153                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
11154                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
11155                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
11156                 </fields>
11157                 <links>
11158                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
11159                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
11160                 </links>
11161         </class>
11162
11163         <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">
11164                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
11165                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11166                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11167                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11168                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11169                 </fields>
11170                 <links>
11171                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11172                 </links>
11173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11174                         <actions>
11175                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11176                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11177                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11178                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11179                         </actions>
11180                 </permacrud>
11181         </class>
11182
11183         <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">
11184                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
11185                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11186                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11187                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11188                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11189                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
11190                 </fields>
11191                 <links>
11192                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11193                 </links>
11194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11195                         <actions>
11196                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11197                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11198                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11199                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11200                         </actions>
11201                 </permacrud>
11202         </class>
11203
11204         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
11205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
11206                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11207                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11208                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11209                 </fields>
11210                 <links>
11211                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11212                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11213                 </links>
11214         </class>
11215
11216         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
11217                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
11218                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11219                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11220                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11221                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11222                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11223                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11224                 </fields>
11225                 <links>
11226                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11227                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
11228                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11229                 </links>
11230         </class>
11231
11232         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
11233                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
11234                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11235                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11236                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
11237                 </fields>
11238                 <links>
11239                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11240                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
11241                 </links>
11242         </class>
11243
11244         <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">
11245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
11246                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11247                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11248                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11249                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11250                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11251                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11252                 </fields>
11253                 <links>
11254                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11255                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
11256                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11257                 </links>
11258         </class>
11259
11260         <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">
11261                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
11262                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
11263                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11264                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
11265                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11266                 </fields>
11267                 <links>
11268                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11269                 </links>
11270                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11271             <actions>
11272                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11273                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
11274                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11275                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11276             </actions>
11277                 </permacrud>
11278         </class>
11279
11280         <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">
11281                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
11282                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
11283                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
11284                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
11285                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
11286                 </fields>
11287                 <links>
11288                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
11289                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
11290                 </links>
11291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11292                         <actions>
11293                                 <create permission="ADMIN_CLAIM_POLICY">
11294                                         <context link="claim_policy" field="org_unit"/>
11295                 </create>
11296                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
11297                                         <context link="claim_policy" field="org_unit"/>
11298                 </retrieve>
11299                                 <update permission="ADMIN_CLAIM_POLICY">
11300                                         <context link="claim_policy" field="org_unit"/>
11301                 </update>
11302                                 <delete permission="ADMIN_CLAIM_POLICY">
11303                                         <context link="claim_policy" field="org_unit"/>
11304                 </delete>
11305                         </actions>
11306                 </permacrud>
11307         </class>
11308
11309     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
11310         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
11311             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11312             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
11313             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11314             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
11315             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
11316             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
11317             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
11318             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
11319             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
11320             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
11321             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
11322             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
11323             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
11324             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
11325             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11326             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
11327                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
11328                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
11329                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
11330         </fields>
11331         <links>
11332             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
11333             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11334         </links>
11335     </class>
11336
11337     <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">
11338         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
11339             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11340             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11341             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11342             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11343             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11344         </fields>
11345     </class>
11346
11347     <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">
11348         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11349             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11350             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11351             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11352             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11353             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11354             <field reporter:label="City" name="city" reporter:datatype="text"/>
11355             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11356             <field reporter:label="State" name="state" reporter:datatype="text"/>
11357             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11358             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11359             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11360         </fields>
11361     </class>
11362
11363     <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">
11364         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11365             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11366             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11367             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11368             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11369             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11370             <field reporter:label="City" name="city" reporter:datatype="text"/>
11371             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11372             <field reporter:label="State" name="state" reporter:datatype="text"/>
11373             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11374             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11375             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11376         </fields>
11377     </class>
11378
11379     <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">
11380         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
11381             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11382             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11383             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11384             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
11385             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
11386             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11387         </fields>
11388     </class>
11389
11390     <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">
11391         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
11392             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11393             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11394             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11395             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
11396             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
11397             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11398         </fields>
11399     </class>
11400
11401         <class id="afsg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_group" oils_persist:tablename="action.fieldset_group" reporter:label="Fieldset Group">
11402                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
11403                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
11404                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11405                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
11406                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
11407                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
11408                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
11409                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
11410                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
11411                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11412                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11413                 </fields>
11414                 <links>
11415                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11416                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11417                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
11418                 </links>
11419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11420                         <actions>
11421                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11422                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11423                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11424                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11425                         </actions>
11426                 </permacrud>
11427         </class>
11428
11429         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
11430                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
11431                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
11432                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
11433                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
11434                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
11435                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
11436                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
11437                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
11438                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
11439                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
11440                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
11441                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
11442                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
11443                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
11444                 </fields>
11445                 <links>
11446                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
11447                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11448                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11449                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
11450                 </links>
11451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11452                         <actions>
11453                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11454                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11455                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11456                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11457                         </actions>
11458                 </permacrud>
11459         </class>
11460
11461         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
11462                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
11463                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
11464                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
11465                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
11466                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
11467                 </fields>
11468                 <links>
11469                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
11470                 </links>
11471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
11472                         <actions>
11473                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11474                     <context link="fieldset" field="owning_lib"/>
11475                 </create>
11476                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11477                     <context link="fieldset" field="owning_lib"/>
11478                 </retrieve>
11479                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11480                     <context link="fieldset" field="owning_lib"/>
11481                 </update>
11482                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11483                     <context link="fieldset" field="owning_lib"/>
11484                 </delete>
11485                         </actions>
11486                 </permacrud>
11487         </class>
11488
11489     <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">
11490         <fields>
11491             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11492             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11493             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11494         </fields>
11495                 <links>
11496                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11497                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11498                 </links>
11499     </class>
11500
11501     <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">
11502         <fields>
11503             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11504             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11505         </fields>
11506                 <links>
11507                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11508                 </links>
11509     </class>
11510
11511     <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">
11512         <fields>
11513             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11514             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11515             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11516         </fields>
11517                 <links>
11518                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11519                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11520                 </links>
11521     </class>
11522
11523     <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">
11524         <fields>
11525             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11526             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11527         </fields>
11528                 <links>
11529                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11530                 </links>
11531     </class>
11532
11533     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11534                 <oils_persist:source_definition><![CDATA[
11535
11536             SELECT  DISTINCT l.*
11537               FROM  action.unfulfilled_hold_loops l
11538                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11539               WHERE l.count = m.max
11540
11541                 ]]></oils_persist:source_definition>
11542         <fields>
11543             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11544             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11545             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11546         </fields>
11547                 <links>
11548                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11549                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11550                 </links>
11551     </class>
11552
11553         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11554                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11555                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11556                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11557                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11558                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11559                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11560                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11561                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11562                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11563                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11564                 </fields>
11565                 <links>
11566                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11567                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11568                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11569                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11570                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11571                 </links>
11572         </class>
11573
11574         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11575                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11576                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11577                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11578                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11579                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11580                 </fields>
11581                 <links>
11582                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11583                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11584                 </links>
11585         </class>
11586
11587         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11588                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11589                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11590                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11591                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11592                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11593                 </fields>
11594                 <links>
11595                 </links>
11596         </class>
11597
11598         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11599                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11600                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11601                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11602                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11603                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11604                 </fields>
11605                 <links>
11606                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11607                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11608                 </links>
11609         </class>
11610         
11611         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11612                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11613                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11614                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11615                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11616                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11617                 </fields>
11618                 <links>
11619                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11620                 </links>
11621         </class>
11622         
11623         <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">
11624                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11625                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11626                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11627                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11628                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11629                 </fields>
11630                 <links>
11631                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11632                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11633                 </links>
11634         </class>
11635
11636         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11637                 <fields oils_persist:primary="name">
11638                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11639                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11640                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11641                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11642                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11643                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11644                 </fields>
11645                 <links>
11646                 </links>
11647         </class>
11648
11649         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11650                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11651                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11652                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11653                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11654                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11655                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11656                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11657                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11658                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11659                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11660                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11661                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11662                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11663                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11664                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11665                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11666                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11667                 </fields>
11668                 <links>
11669                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11670                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11671                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11672                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11673                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11674                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11675                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11676                 </links>
11677         </class>
11678
11679         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11680                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11681                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11682                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11683                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11684                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11685                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11686                 </fields>
11687                 <links>
11688                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11689                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11690                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11691                 </links>
11692         </class>
11693
11694         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11695                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11696                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11697                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11698                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11699                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11700                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11701                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11702                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11703                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11704                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11705                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11706                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11707                 </fields>
11708                 <links>
11709                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11710                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11711                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11712                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11713                 </links>
11714         </class>
11715
11716         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11717                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11718                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11719                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11720                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11721                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11722                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11723                 </fields>
11724                 <links>
11725                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11726                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11727                 </links>
11728         </class>
11729
11730         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11731                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11732                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11733                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11734                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11735                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11736                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11737                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11738                 </fields>
11739                 <links>
11740                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11741                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11742                 </links>
11743         </class>
11744
11745         <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">
11746                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11747                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11748                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11749                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11750                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11751                 </fields>
11752                 <links>
11753                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11754                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11755                 </links>
11756         </class>
11757
11758         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11759                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11760                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11761                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11762                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11763                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11764                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11765                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11766                 </fields>
11767                 <links>
11768                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11769                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11770                 </links>
11771         </class>
11772
11773         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11774                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11775                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11776                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11777                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11778                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11779                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11780                 </fields>
11781                 <links>
11782                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11783                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11784                 </links>
11785         </class>
11786
11787         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11788                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11789                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11790                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11791                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11792                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11793                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11794                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11795                 </fields>
11796                 <links>
11797                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11798                 </links>
11799         </class>
11800
11801         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11802                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11803                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11804                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11805                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11806                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11807                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11808                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11809                 </fields>
11810                 <links>
11811                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11812                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11813                 </links>
11814         </class>
11815
11816         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11817                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11818                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11819                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11820                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11821                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11822                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11823                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11824                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11825                 </fields>
11826                 <links>
11827                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11828                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11829                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11830                 </links>
11831         </class>
11832
11833         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11834                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11835                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11836                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11837                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11838                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11839                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11840                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11841                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11842                 </fields>
11843                 <links>
11844                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11845                 </links>
11846         </class>
11847
11848         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11849                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11850                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11851                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11852                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11853                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11854                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11855                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11856                 </fields>
11857                 <links>
11858                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11859                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11860                 </links>
11861         </class>
11862
11863         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11864                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11865                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11866                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11867                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11868                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11869                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11870                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11871                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11872                 </fields>
11873                 <links>
11874                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11875                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11876                 </links>
11877         </class>
11878
11879         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11880                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11881                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11882                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11883                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11884                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11885                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11886                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11887                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11888                 </fields>
11889                 <links>
11890                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11891                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11892                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11893                 </links>
11894         </class>
11895
11896         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11897                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11898                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11899                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11900                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11901                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11902                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11903                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11904                 </fields>
11905                 <links>
11906                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11907                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11908                 </links>
11909         </class>
11910
11911         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11912                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11913                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11914                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11915                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11916                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11917                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11918                 </fields>
11919                 <links>
11920                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11921                 </links>
11922         </class>
11923
11924         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11925                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11926                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11927                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11928                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11929                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11930                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11931                 </fields>
11932                 <links>
11933                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11934                 </links>
11935         </class>
11936
11937         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11938                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11939                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11940                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11941                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11942                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11943                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11944                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11945                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11946                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11947                 </fields>
11948                 <links>
11949                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11950                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11951                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11952                 </links>
11953         </class>
11954
11955         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11956                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11957                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11958                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11959                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11960                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11961                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11962                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11963                 </fields>
11964                 <links>
11965                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11966                 </links>
11967         </class>
11968
11969         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11970                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11971                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11972                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11973                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11974                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11975                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11976                 </fields>
11977                 <links>
11978                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11979                 </links>
11980         </class>
11981
11982         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11983                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11984                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11985                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11986                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11987                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11988                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11989                 </fields>
11990                 <links>
11991                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11992                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11993                 </links>
11994         </class>
11995
11996         <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">
11997                 <fields oils_persist:primary="id">
11998                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11999                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
12000                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
12001                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
12002                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
12003                 </fields>
12004                 <links>
12005                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
12006                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
12007                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
12008                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
12009                 </links>
12010         </class>
12011
12012         <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">
12013                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
12014                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12015                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
12016                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12017                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
12018                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
12019                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12020                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
12021                 </fields>
12022                 <links/>
12023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12024                         <actions>
12025                                 <retrieve/>
12026                         </actions>
12027                 </permacrud>
12028         </class>
12029
12030         <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">
12031                 <fields oils_persist:primary="ptype_key">
12032                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
12033                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12034                 </fields>
12035                 <links/>
12036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12037                         <actions>
12038                                 <retrieve/>
12039                         </actions>
12040                 </permacrud>
12041         </class>
12042
12043         <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">
12044                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
12045                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12046                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
12047                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12048                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
12049                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12050                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12051                 </fields>
12052                 <links>
12053                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
12054                 </links>
12055                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12056                         <actions>
12057                                 <retrieve/>
12058                         </actions>
12059                 </permacrud>
12060         </class>
12061
12062         <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">
12063                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
12064                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12065                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12066                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
12067                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12068                 </fields>
12069                 <links>
12070                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
12071                 </links>
12072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12073                         <actions>
12074                                 <retrieve/>
12075                         </actions>
12076                 </permacrud>
12077         </class>
12078
12079     <class
12080         id="uvs"
12081         controller="open-ils.cstore open-ils.pcrud"
12082         oils_obj:fieldmapper="url_verify::session"
12083         oils_persist:tablename="url_verify.session"
12084         reporter:label="URL Verification Session"
12085     >
12086         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
12087             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
12088             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
12089                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
12090             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
12091             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
12092             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12093             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
12094             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
12095             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
12096         </fields>
12097
12098         <links>
12099             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12100             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12101             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
12102             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
12103             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
12104         </links>
12105
12106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12107             <actions>
12108                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
12109             </actions>
12110         </permacrud>
12111
12112     </class>
12113
12114     <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">
12115         <oils_persist:source_definition><![CDATA[
12116             SELECT
12117                 cbrebi.id AS id,  -- so we can have a pkey in our view
12118                 uvs.id AS session,
12119                 uvs.owning_lib,
12120                 cbrebi.target_biblio_record_entry
12121             FROM url_verify.session uvs
12122             JOIN container.biblio_record_entry_bucket cbreb
12123                 ON (uvs.container = cbreb.id)
12124             JOIN container.biblio_record_entry_bucket_item cbrebi
12125                 ON (cbrebi.bucket = cbreb.id)
12126         ]]></oils_persist:source_definition>
12127         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
12128             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
12129             <field reporter:label="Session" name="session" reporter:datatype="link" />
12130             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
12131             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
12132         </fields>
12133         <links>
12134             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
12135             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
12136             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
12137         </links>
12138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12139             <actions>
12140                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
12141             </actions>
12142         </permacrud>
12143     </class>
12144
12145     <class
12146         id="uvus"
12147         controller="open-ils.cstore open-ils.pcrud"
12148         oils_obj:fieldmapper="url_verify::url_selector"
12149         oils_persist:tablename="url_verify.url_selector"
12150         reporter:label="URL Verification URL Selector"
12151     >
12152         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
12153             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
12154             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
12155                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12156             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
12157         </fields>
12158
12159         <links>
12160             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12161             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
12162         </links>
12163
12164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12165             <actions>
12166                 <create permission="URL_VERIFY">
12167                     <context link="session" field="owning_lib"/>
12168                 </create>
12169                 <retrieve permission="URL_VERIFY">
12170                     <context link="session" field="owning_lib"/>
12171                 </retrieve>
12172                 <update permission="URL_VERIFY">
12173                     <context link="session" field="owning_lib"/>
12174                 </update>
12175                 <delete permission="URL_VERIFY">
12176                     <context link="session" field="owning_lib"/>
12177                 </delete>
12178             </actions>
12179         </permacrud>
12180
12181     </class>
12182
12183     <class
12184         id="uvu"
12185         controller="open-ils.cstore open-ils.pcrud"
12186         oils_obj:fieldmapper="url_verify::url"
12187         oils_persist:tablename="url_verify.url"
12188         reporter:label="URL Verification URL"
12189     >
12190         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
12191             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
12192                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
12193                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
12194                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12195                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
12196             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12197             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12198             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
12199             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
12200             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
12201             <field reporter:label="Host" name="host" reporter:datatype="text"/>
12202             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
12203             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
12204             <field reporter:label="Path" name="path" reporter:datatype="text"/>
12205             <field reporter:label="Page" name="page" reporter:datatype="text"/>
12206             <field reporter:label="Query" name="query" reporter:datatype="text"/>
12207             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
12208             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
12209         </fields>
12210
12211         <links>
12212             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
12213             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
12214             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12215             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
12216             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
12217         </links>
12218
12219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12220             <actions>
12221                 <create permission="URL_VERIFY">
12222                     <context link="session" field="owning_lib"/>
12223                 </create>
12224                 <retrieve permission="URL_VERIFY">
12225                     <context link="session" field="owning_lib"/>
12226                 </retrieve>
12227                 <update permission="URL_VERIFY">
12228                     <context link="session" field="owning_lib"/>
12229                 </update>
12230                 <delete permission="URL_VERIFY">
12231                     <context link="session" field="owning_lib"/>
12232                 </delete>
12233             </actions>
12234         </permacrud>
12235
12236     </class>
12237
12238     <class
12239         id="uvva"
12240         controller="open-ils.cstore open-ils.pcrud"
12241         oils_obj:fieldmapper="url_verify::verification_attempt"
12242         oils_persist:tablename="url_verify.verification_attempt"
12243         reporter:label="URL Verification Attempt"
12244     >
12245         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
12246             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
12247                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
12248                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
12249             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
12250             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
12251         </fields>
12252
12253         <links>
12254             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12255             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12256         </links>
12257
12258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12259             <actions>
12260                 <create permission="URL_VERIFY">
12261                     <context link="session" field="owning_lib"/>
12262                 </create>
12263                 <retrieve permission="URL_VERIFY">
12264                     <context link="session" field="owning_lib"/>
12265                 </retrieve>
12266                 <update permission="URL_VERIFY">
12267                     <context link="session" field="owning_lib"/>
12268                 </update>
12269                 <delete permission="URL_VERIFY">
12270                     <context link="session" field="owning_lib"/>
12271                 </delete>
12272             </actions>
12273         </permacrud>
12274
12275     </class>
12276
12277     <class
12278         id="uvuv"
12279         controller="open-ils.cstore open-ils.pcrud"
12280         oils_obj:fieldmapper="url_verify::url_verification"
12281         oils_persist:tablename="url_verify.url_verification"
12282         reporter:label="URL Verification"
12283     >
12284         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
12285             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
12286                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
12287                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
12288             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
12289             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
12290             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
12291             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
12292                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
12293         </fields>
12294
12295         <links>
12296             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
12297             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
12298             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
12299         </links>
12300
12301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12302             <actions>
12303                 <create permission="URL_VERIFY">
12304                     <context link="attempt" jump="session" field="owning_lib"/>
12305                 </create>
12306                 <retrieve permission="URL_VERIFY">
12307                     <context link="attempt" jump="session" field="owning_lib"/>
12308                 </retrieve>
12309                 <update permission="URL_VERIFY">
12310                     <context link="attempt" jump="session" field="owning_lib"/>
12311                 </update>
12312                 <delete permission="URL_VERIFY">
12313                     <context link="attempt" jump="session" field="owning_lib"/>
12314                 </delete>
12315             </actions>
12316         </permacrud>
12317
12318     </class>
12319
12320         <class
12321                 id="cfdi"
12322                 controller="open-ils.cstore open-ils.pcrud"
12323                 oils_obj:fieldmapper="config::filter_dialog_interface"
12324                 oils_persist:tablename="config.filter_dialog_interface"
12325                 reporter:label="FilterDialog Interface">
12326                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
12327                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
12328                         <field reporter:label="Description" name="description" reporter:datatype="text" />
12329                 </fields>
12330                 <links>
12331                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
12332                 </links>
12333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12334                         <actions>
12335                                 <retrieve />
12336                         </actions>
12337                 </permacrud>
12338         </class>
12339
12340         <class
12341                 id="cfdfs"
12342                 controller="open-ils.cstore open-ils.pcrud"
12343                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
12344                 oils_persist:tablename="config.filter_dialog_filter_set"
12345                 reporter:label="FilterDialog Filter Set">
12346                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
12347                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12348                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12349                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12350                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12351                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
12352                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12353                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
12354                 </fields>
12355                 <links>
12356                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12357                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12358                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
12359                 </links>
12360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12361                         <actions>
12362                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12363                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12364                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12365                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12366                         </actions>
12367                 </permacrud>
12368
12369         </class>
12370
12371         <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">
12372                 <fields oils_persist:primary="code">
12373                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
12374                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
12375                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
12376                 </fields>
12377                 <links/>
12378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12379                         <actions>
12380                                 <retrieve/>
12381                         </actions>
12382                 </permacrud>
12383         </class>
12384
12385         <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">
12386                 <oils_persist:source_definition><![CDATA[
12387
12388             SELECT  b.id,
12389                     MAX(dcp.edit_date) AS last_delete_date
12390              FROM   biblio.record_entry b
12391                     JOIN asset.call_number cn ON (cn.record = b.id)
12392                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
12393              WHERE  NOT b.deleted
12394              GROUP BY b.id
12395              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
12396
12397                 ]]></oils_persist:source_definition>
12398                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12399                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12400                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
12401                 </fields>
12402                 <links>
12403                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12404                 </links>
12405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12406                         <actions>
12407                                 <retrieve/>
12408                         </actions>
12409                 </permacrud>
12410         </class>
12411
12412         <class id="jubstlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::li_state_label" oils_persist:tablename="acq.li_state_label" oils_persist:readonly="true" reporter:label="Line Item State Labels" oils_persist:field_safe="true">
12413                 <fields oils_persist:primary="id">
12414                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12415                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12416                 </fields>
12417                 <links/>
12418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12419                         <actions>
12420                                 <retrieve/>
12421                         </actions>
12422                 </permacrud>
12423         </class>
12424
12425         <class id="acqpostlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_state_label" oils_persist:tablename="acq.po_state_label" oils_persist:readonly="true" reporter:label="PO State Labels">
12426                 <fields oils_persist:primary="id">
12427                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12428                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12429                 </fields>
12430                 <links/>
12431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12432                         <actions>
12433                                 <retrieve/>
12434                         </actions>
12435                 </permacrud>
12436         </class>
12437
12438
12439         <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">
12440                 <oils_persist:source_definition><![CDATA[
12441
12442             -- -- 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.
12443             -- -- 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
12444             -- -- may not.
12445             -- SELECT
12446             --     bre.id AS bib_id,
12447             --     COALESCE( z.copy_count, 0 ) AS copy_count,
12448             --     COALESCE( z.hold_count, 0 ) AS hold_count,
12449             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
12450             -- FROM (
12451                 SELECT
12452                     y.bre AS id,
12453                     COALESCE( x.copy_count, 0 ) AS copy_count,
12454                     y.hold_count AS hold_count,
12455                     (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
12456                 FROM (
12457                         SELECT
12458                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
12459                             COUNT(*) AS hold_count
12460                         FROM action.hold_request h
12461                         WHERE
12462                             cancel_time IS NULL
12463                             AND fulfillment_time IS NULL
12464                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
12465                         GROUP BY 1
12466                     )y LEFT JOIN (
12467                         SELECT 
12468                             (SELECT id
12469                                 FROM biblio.record_entry 
12470                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
12471                             ) AS bre, 
12472                             COUNT(*) AS copy_count
12473                         FROM asset.copy
12474                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
12475                         WHERE copy.holdable 
12476                             AND NOT copy.deleted 
12477                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
12478                         GROUP BY 1
12479                     )x ON x.bre = y.bre
12480                 -- )z RIGHT JOIN (
12481                 --     SELECT id
12482                 --     FROM biblio.record_entry
12483                 --     WHERE NOT deleted
12484                 -- )bre ON (z.bib_id = bre.id)
12485                 
12486
12487                 ]]></oils_persist:source_definition>
12488                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12489                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12490                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
12491                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
12492                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
12493                 </fields>
12494                 <links>
12495                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12496                 </links>
12497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12498                         <actions>
12499                                 <retrieve/>
12500                         </actions>
12501                 </permacrud>
12502         </class>
12503
12504         <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">
12505                 <oils_persist:source_definition><![CDATA[
12506             SELECT *,
12507                 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,
12508                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12509             FROM
12510                 (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
12511                     FROM
12512                         action.hold_request ahr
12513                         JOIN reporter.hold_request_record rhrr USING (id)
12514                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12515                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12516                     WHERE
12517                         ahr.cancel_time IS NULL
12518                         AND ahr.fulfillment_time IS NULL
12519                     GROUP BY bib_record, pickup_lib
12520                 )x
12521                 JOIN
12522                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12523                     FROM
12524                         action.hold_request ahr
12525                         JOIN reporter.hold_request_record rhrr USING (id)
12526                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12527                     WHERE
12528                         ahr.cancel_time IS NULL
12529                         AND ahr.fulfillment_time IS NULL
12530                     GROUP BY bib_record
12531                 )y
12532                 USING (id)
12533                 ]]></oils_persist:source_definition>
12534                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12535                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12536                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12537                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12538                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12539                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12540                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12541                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12542                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12543                 </fields>
12544                 <links>
12545                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12546                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12547                 </links>
12548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12549                         <actions>
12550                                 <retrieve/>
12551                         </actions>
12552                 </permacrud>
12553         </class>
12554
12555         <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) ">
12556                 <oils_persist:source_definition><![CDATA[
12557             WITH counts_at_ou AS (
12558                 SELECT  rhrr.bib_record AS id,
12559                         aou.id AS pickup_lib_or_desc,
12560                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
12561                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
12562                   FROM  actor.org_unit aou
12563                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12564                         action.hold_request ahr
12565                         JOIN reporter.hold_request_record rhrr USING (id)
12566                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12567                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12568                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12569                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12570                         AND (actor.org_unit_ancestor_at_depth(ahr.pickup_lib,aout.depth)).id = (actor.org_unit_ancestor_at_depth(ac.circ_lib,aout.depth)).id
12571                   GROUP BY 1, 2
12572             )
12573             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12574                    y.holds_everywhere, y.copy_count_everywhere,
12575                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE x.holds_at_or_below::FLOAT/x.copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
12576                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12577             FROM counts_at_ou x
12578                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12579                     FROM
12580                         action.hold_request ahr
12581                         JOIN reporter.hold_request_record rhrr USING (id)
12582                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12583                     WHERE
12584                         ahr.cancel_time IS NULL
12585                         AND ahr.fulfillment_time IS NULL
12586                     GROUP BY bib_record
12587                 )y
12588                 USING (id)
12589                 ]]></oils_persist:source_definition>
12590                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12591                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12592                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12593                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12594                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12595                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12596                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12597                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12598                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12599                 </fields>
12600                 <links>
12601                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12602                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12603                 </links>
12604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12605                         <actions>
12606                                 <retrieve/>
12607                         </actions>
12608                 </permacrud>
12609         </class>
12610
12611         <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">
12612                 <oils_persist:source_definition><![CDATA[
12613             SELECT
12614                 ac.id,
12615                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12616                 MAX(actac.xact_start) AS last_circ
12617             FROM asset.copy ac
12618                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12619             GROUP BY ac.id
12620
12621             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12622             --SELECT
12623             --    ac.id,
12624             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12625             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12626             --FROM asset.copy ac
12627             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12628             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12629             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12630                 ]]></oils_persist:source_definition>
12631                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12632                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12633                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12634                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12635                 </fields>
12636                 <links>
12637                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12638                 </links>
12639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12640                         <actions>
12641                                 <retrieve/>
12642                         </actions>
12643                 </permacrud>
12644         </class>
12645
12646         <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">
12647                 <fields oils_persist:primary="id">
12648                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12649                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12650                 </fields>
12651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12652                         <actions>
12653                                 <retrieve/>
12654                         </actions>
12655                 </permacrud>
12656         </class>
12657
12658         <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">
12659                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12660                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12661                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12662                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12663                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12664                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12665                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12666                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12667                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12668                 </fields>
12669                 <links>
12670                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12671                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12672                 </links>
12673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12674                         <actions>
12675                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12676                                 <retrieve/>
12677                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12678                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12679                         </actions>
12680                 </permacrud>
12681         </class>
12682
12683         <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">
12684                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12685                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12686                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12687                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12688                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12689                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12690                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12691                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12692                 </fields>
12693                 <links>
12694                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12695                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12696                 </links>
12697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12698                         <actions>
12699                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12700                                 <retrieve/>
12701                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12702                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12703                         </actions>
12704                 </permacrud>
12705         </class>
12706
12707
12708         <!-- ********************************************************************************************************************* -->
12709         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12710         <!-- ********************************************************************************************************************* -->
12711         <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">
12712                 <fields oils_persist:primary="id">
12713                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12714                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12715                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12716                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12717                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12718                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12719                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12720                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12721                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12722                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12723                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12724                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12725                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12726                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12727                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12728                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12729                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12730                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12731                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12732                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12733                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12734                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12735                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12736                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12737                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12738                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12739                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12740                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12741                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12742                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12743                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12744                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12745                 </fields>
12746                 <links>
12747                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12748                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12749                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12750                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12751                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12752                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12753                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12754                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12755                 </links>
12756         </class>
12757
12758         <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">
12759                 <fields oils_persist:primary="id">
12760                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12761                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12762                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12763                 </fields>
12764                 <links>
12765                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12766                 </links>
12767         </class>
12768
12769         <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">
12770                 <fields oils_persist:primary="id">
12771                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12772                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12773                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12774                 </fields>
12775                 <links>
12776                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12777                 </links>
12778         </class>
12779
12780         <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">
12781                 <fields oils_persist:primary="id">
12782                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12783
12784                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12785                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12786                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12787
12788                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12789                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12790                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12791
12792                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12793                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12794
12795                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12796                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12797                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12798
12799                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12800                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12801
12802                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12803                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12804                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12805
12806                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12807                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12808                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12809
12810                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12811                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12812                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12813                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12814
12815                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12816                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12817
12818                 </fields>
12819                 <links>
12820                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12821                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12822                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12823                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12824                 </links>
12825         </class>
12826
12827         <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">
12828                 <oils_persist:source_definition><![CDATA[
12829
12830             SELECT
12831                 po.ordering_agency AS ordering_agency,
12832                 po.id AS purchase_order,
12833                 li.id AS lineitem,
12834                 lid.id AS lineitem_detail,
12835                 cpa.id AS claim_policy_action
12836             FROM
12837                 acq.lineitem_detail lid
12838                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12839                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12840                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12841                 JOIN acq.claim_policy_action cpa ON (
12842                     cpa.claim_policy = cp.id
12843
12844                     -- we only care about claim policy actions whose claim
12845                     -- interval we'd reached or exceeded
12846                     AND (NOW() - cpa.action_interval) > po.order_date
12847
12848                     -- filter out all claim policy actions where claim events
12849                     -- have occurred on or after the action's action_interval
12850                     AND NOT EXISTS (
12851                         SELECT 1
12852                         FROM
12853                             acq.claim_event evt
12854                             JOIN acq.claim claim ON (
12855                                 claim.id = evt.claim
12856                                 AND claim.lineitem_detail = lid.id
12857                             )
12858                         WHERE
12859                             evt.event_date >= (po.order_date + cpa.action_interval)
12860                     )
12861                 )
12862             WHERE
12863                 lid.cancel_reason IS NULL
12864                 AND li.cancel_reason IS NULL -- belt/suspenders
12865                 AND po.cancel_reason IS NULL -- belt/suspenders
12866                 AND lid.recv_time IS NULL
12867                 AND po.state = 'on-order'
12868             ORDER BY 1, 2, 3, 4, 5
12869
12870                 ]]></oils_persist:source_definition>
12871                 <fields>
12872                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12873                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12874                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12875                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12876                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12877                 </fields>
12878                 <links>
12879                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12880                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12881                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12882                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12883                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12884                 </links>
12885         </class>
12886         <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">
12887                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12888                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12889                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12890                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12891                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12892                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12893                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12894                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12895                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12896                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12897                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12898                 </fields>
12899                 <links>
12900                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12901                 </links>
12902     </class>
12903         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12904                 <oils_persist:source_definition><![CDATA[
12905             SELECT * FROM acq.lineitem_summary 
12906                                 WHERE item_count > (invoice_count + cancel_count)
12907         ]]></oils_persist:source_definition>
12908                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12909                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12910                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12911                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12912                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12913                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12914                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12915                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12916                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12917                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12918                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12919                 </fields>
12920                 <links>
12921                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12922                 </links>
12923     </class>
12924         <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">
12925                 <oils_persist:source_definition><![CDATA[
12926
12927                         SELECT  t.*
12928                           FROM  action.transit_copy t
12929                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12930                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12931                           WHERE s.parent_ou <> d.parent_ou
12932
12933                 ]]></oils_persist:source_definition>
12934                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12935                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12936                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12937                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12938                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12939                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12940                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12941                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12942                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12943                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12944                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12945                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12946                 </fields>
12947                 <links>
12948                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12949                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12950                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12951                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12952                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12953                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12954                 </links>
12955         </class>
12956
12957     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12958                 <oils_persist:source_definition><![CDATA[
12959
12960         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12961                 SELECT
12962                         cp.id as copy,
12963                         COUNT(circ.id),
12964                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12965                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12966                 FROM
12967                         asset.copy cp
12968                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12969                 GROUP BY 1, 3, 4
12970                 UNION ALL
12971                 SELECT
12972                         cp.id as copy,
12973                         COUNT(circ.id),
12974                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12975                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12976                 FROM
12977                         asset.copy cp
12978                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12979                 GROUP BY 1, 3, 4
12980                 UNION ALL
12981                 SELECT
12982                         id as copy,
12983                         circ_count,
12984                         -1 AS year,
12985                         false as is_renewal
12986                 FROM
12987                         extend_reporter.legacy_circ_count
12988         )x GROUP BY 1, 3, 4
12989
12990                 ]]></oils_persist:source_definition>
12991         <fields>
12992             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12993             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12994             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12995             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12996         </fields>
12997                 <links>
12998                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12999                 </links>
13000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13001                         <actions>
13002                                 <retrieve/>
13003                         </actions>
13004                 </permacrud>
13005     </class>
13006
13007         <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">
13008                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
13009                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
13010                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
13011                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
13012                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
13013                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
13014                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
13015                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
13016                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
13017                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
13018                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
13019                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
13020                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
13021                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
13022                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
13023                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
13024                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
13025                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
13026                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
13027                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
13028                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
13029                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
13030                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
13031                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
13032                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
13033                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
13034                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
13035                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
13036                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
13037                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
13038                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
13039                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
13040                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
13041                 </fields>
13042                 <links>
13043                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
13044                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
13045                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
13046                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
13047                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
13048                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
13049                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13050                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
13051                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
13052                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
13053                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
13054                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
13055                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
13056                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
13057                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
13058                 </links>
13059         </class>
13060
13061     <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">
13062         <fields oils_persist:primary="id">
13063             <field reporter:label="Title" name="title" reporter:datatype="text"/>
13064             <field reporter:label="Author" name="author" reporter:datatype="text"/>
13065             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
13066             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13067             <field reporter:label="Price" name="price" reporter:datatype="money"/>
13068             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
13069             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
13070             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
13071             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
13072             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
13073             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
13074             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
13075             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
13076             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
13077             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
13078             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
13079             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
13080             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
13081             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
13082             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
13083             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
13084             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
13085             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
13086             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
13087             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
13088             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
13089             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
13090             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
13091             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
13092             <field reporter:label="Status" name="status" reporter:datatype="link"/>
13093             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
13094             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
13095             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
13096             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
13097         </fields>
13098         <links>
13099             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13100             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
13101             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13102             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13103             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
13104             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
13105             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
13106             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
13107         </links>
13108     </class>
13109
13110     <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">
13111         <fields oils_persist:primary="id">
13112             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13113             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13114             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13115             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13116         </fields>
13117         <links>
13118             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13119             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13120         </links>
13121     </class>
13122
13123     <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">
13124         <fields oils_persist:primary="owning_lib">
13125             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13126             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13127             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13128         </fields>
13129         <links>
13130             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13131         </links>
13132     </class>
13133
13134     <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">
13135         <fields oils_persist:primary="id">
13136             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13137             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13138             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13139             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13140             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13141         </fields>
13142         <links>
13143             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13144             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13145             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13146         </links>
13147     </class>
13148
13149     <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">
13150         <fields oils_persist:primary="circ_lib">
13151             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13152             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13153             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13154             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13155         </fields>
13156         <links>
13157             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13158             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13159         </links>
13160     </class>
13161
13162     <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">
13163         <fields oils_persist:primary="id">
13164             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13165             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13166             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13167             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13168             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13169         </fields>
13170         <links>
13171             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13172             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13173             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13174         </links>
13175     </class>
13176
13177     <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">
13178         <fields oils_persist:primary="home_ou">
13179             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13180             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13181             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13182             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13183         </fields>
13184         <links>
13185             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13186             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13187         </links>
13188     </class>
13189         <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">
13190                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
13191                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
13192                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13193                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13194                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
13195                 </fields>
13196                 <links>
13197                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13198                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
13199                 </links>
13200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13201                         <actions>
13202                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13203                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
13204                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13205                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13206                         </actions>
13207                 </permacrud>
13208         </class>
13209         <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">
13210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
13211                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
13212                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
13213                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
13214                 </fields>
13215                 <links>
13216                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
13217                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
13218                         </links>
13219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13220                 <actions>
13221                                 <create permission="ADMIN_ACQ_FUND_TAG">
13222                                         <context link="tag" field="owner"/>
13223                                 </create>
13224                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
13225                                         <context link="tag" field="owner"/>
13226                                 </retrieve>
13227                                 <update permission="ADMIN_ACQ_FUND_TAG">
13228                                         <context link="tag" field="owner"/>
13229                                 </update>
13230                                 <delete permission="ADMIN_ACQ_FUND_TAG">
13231                                         <context link="tag" field="owner"/>
13232                                 </delete>
13233                         </actions>
13234                 </permacrud>
13235         </class>
13236         <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">
13237                 <oils_persist:source_definition><![CDATA[
13238                 SELECT
13239                         poi.purchase_order AS purchase_order,
13240                         ii.invoice AS invoice,
13241                         NULL AS lineitem,
13242                         poi.id AS po_item,
13243                         NULL AS picklist
13244                 FROM
13245                         acq.po_item poi
13246                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
13247                 UNION SELECT
13248                         jub.purchase_order AS purchase_order,
13249                         ie.invoice AS invoice,
13250                         jub.id AS lineitem,
13251                         NULL AS po_item,
13252                         jub.picklist AS picklist
13253                 FROM
13254                         acq.lineitem jub
13255                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
13256                 UNION SELECT
13257                         ii.purchase_order AS purchase_order,
13258                         ii.invoice AS invoice,
13259                         NULL AS lineitem,
13260                         NULL AS po_item,
13261                         NULL AS picklist
13262                 FROM
13263                         acq.invoice_item ii
13264                 WHERE ii.po_item IS NULL
13265                 UNION SELECT
13266                         ie.purchase_order AS purchase_order,
13267                         ie.invoice AS invoice,
13268                         NULL AS lineitem,
13269                         NULL AS po_item,
13270                         NULL AS picklist
13271                 FROM
13272                         acq.invoice_entry ie
13273                 WHERE ie.lineitem IS NULL
13274                 UNION SELECT
13275                         NULL AS purchase_order,
13276                         NULL AS invoice,
13277                         jub.id AS lineitem,
13278                         NULL AS po_item,
13279                         jub.picklist AS picklist
13280                 FROM
13281                         acq.lineitem jub
13282                 WHERE jub.purchase_order IS NULL
13283                 ]]></oils_persist:source_definition>
13284                 <fields>
13285                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
13286                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
13287                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
13288                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
13289                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
13290                 </fields>
13291                 <links>
13292                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
13293                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
13294                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
13295                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
13296                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
13297                 </links>
13298         </class>
13299         <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">
13300                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
13301                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13302                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13303                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
13304                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
13305                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
13306                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
13307                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
13308                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
13309                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
13310                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
13311                 </fields>
13312                 <links>
13313                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13314                 </links>
13315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13316                         <actions>
13317                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13318                                 <retrieve/>
13319                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13320                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13321                         </actions>
13322                 </permacrud>
13323         </class>
13324
13325         <class id="coustl" controller="open-ils.cstore" 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">
13326                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
13327                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13328                         <field name="date_applied" reporter:datatype="timestamp"/>
13329                         <field name="org" reporter:datatype="org_unit"/>
13330                         <field name="original_value" reporter:datatype="text"/>
13331                         <field name="new_value" reporter:datatype="text"/>
13332                         <field name="field_name" reporter:datatype="link"/>
13333                 </fields>
13334                 <links>
13335                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
13336                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
13337                 </links>
13338         </class>
13339         <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">
13340                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13341                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13342                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13343                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13344                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13345                 </fields>
13346                 <links>
13347                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13348                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
13349                 </links>
13350         </class>
13351         <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">
13352                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13353                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13354                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13355                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13356                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13357                 </fields>
13358                 <links>
13359                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13360                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
13361                 </links>
13362         </class>
13363         <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">
13364                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
13365                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
13366                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13367                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
13368                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
13369                 </fields>
13370                 <links>
13371                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
13372                 </links>
13373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13374                         <actions>
13375                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13376                                 <retrieve/>
13377                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13378                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13379                         </actions>
13380                 </permacrud>
13381         </class>
13382         <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">
13383                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
13384                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13385                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
13386                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
13387                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
13388                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
13389                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
13390                 </fields>
13391                 <links>
13392                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
13393                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
13394                 </links>
13395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13396                         <actions>
13397                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13398                                 <retrieve/>
13399                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13400                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13401                         </actions>
13402                 </permacrud>
13403         </class>
13404         <class id="cctt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_tag_type" oils_persist:tablename="config.copy_tag_type" reporter:label="Copy Tag Types" oils_persist:field_safe="true">
13405                 <fields oils_persist:primary="code">
13406                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
13407                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
13408                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13409                 </fields>
13410                 <links>
13411                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13412                 </links>
13413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13414                         <actions>
13415                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13416                                 <retrieve/>
13417                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13418                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13419                         </actions>
13420                 </permacrud>
13421         </class>
13422         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Item Tags" oils_persist:field_safe="true">
13423                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
13424                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13425                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
13426                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
13427                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13428                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
13429                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
13430                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13431                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
13432                 </fields>
13433                 <links>
13434                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
13435                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13436                 </links>
13437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13438                         <actions>
13439                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
13440                                 <retrieve/>
13441                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
13442                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
13443                         </actions>
13444                 </permacrud>
13445         </class>
13446         <class id="acptcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag_copy_map" oils_persist:tablename="asset.copy_tag_copy_map" reporter:label="Copy Tag Copy Map" oils_persist:field_safe="true">
13447                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
13448                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13449                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
13450                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
13451                 </fields>
13452                 <links>
13453                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13454                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
13455                 </links>
13456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13457                         <actions>
13458                                 <create permission="UPDATE_COPY">
13459                     <context link="copy" field="circ_lib"/>
13460                 </create>
13461                                 <retrieve/>
13462                                 <update permission="UPDATE_COPY">
13463                     <context link="copy" field="circ_lib"/>
13464                 </update>
13465                                 <delete permission="UPDATE_COPY">
13466                     <context link="copy" field="circ_lib"/>
13467                 </delete>
13468                         </actions>
13469                 </permacrud>
13470         </class>
13471         <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">
13472         <oils_persist:source_definition><![CDATA[
13473         SELECT ahcm.target_copy AS id,count(*) AS count
13474          FROM
13475          action.hold_request ahr,
13476          action.hold_copy_map ahcm
13477          WHERE
13478          ahr.cancel_time IS NULL AND
13479          ahr.fulfillment_time IS NULL AND
13480          ahr.capture_time IS NULL AND
13481          ahr.id = ahcm.hold
13482          GROUP BY ahcm.target_copy
13483         ]]></oils_persist:source_definition>
13484         <fields oils_persist:primary="id">
13485             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13486             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
13487         </fields>
13488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13489             <actions>
13490                <retrieve/>
13491             </actions>
13492         </permacrud>
13493         </class>
13494
13495         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
13496                 oils_obj:fieldmapper="config::workstation_setting_type" 
13497                 oils_persist:tablename="config.workstation_setting_type" 
13498                 reporter:label="Workstation Setting Type">
13499                 <fields oils_persist:primary="name">
13500                         <field name="name" reporter:datatype="text"/>
13501                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
13502                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
13503                         <field name="datatype" reporter:datatype="text"/>
13504                         <field name="fm_class" reporter:datatype="text"/>
13505                         <field name="grp" reporter:datatype="link"/>
13506                 </fields>
13507                 <links>
13508                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13509                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13510                 </links>
13511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13512                         <actions>
13513                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13514                                 <retrieve/>
13515                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13516                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13517                         </actions>
13518                 </permacrud>
13519         </class>
13520
13521         <!-- no pcrud access is granted for now, because it's assumed these
13522                          setting values will be applied and retrived via the API. -->
13523         <class id="awss" 
13524                 controller="open-ils.cstore"
13525                 oils_obj:fieldmapper="actor::workstation_setting" 
13526                 oils_persist:tablename="actor.workstation_setting" 
13527                 reporter:label="Workstation Setting">
13528                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13529                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13530                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13531                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13532                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13533                 </fields>
13534                 <links>
13535                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13536                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13537                 </links>
13538         </class>
13539
13540         <class id="cht" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_type" oils_persist:tablename="config.hold_type" reporter:label="Hold Type" oils_persist:readonly="true">
13541         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13542                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13543                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13544                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13545         </fields>
13546         </class>
13547
13548         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13549                 oils_obj:fieldmapper="config::print_template" 
13550                 oils_persist:tablename="config.print_template" 
13551                 reporter:label="Print Templates">
13552                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13553                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13554                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13555                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13556                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13557                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13558                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13559                         <field name="content_type" reporter:datatype="text"/>
13560                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13561                 </fields>
13562                 <links>
13563                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13564                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13565                 </links>
13566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13567                         <actions>
13568                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13569                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13570                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13571                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13572                         </actions>
13573                 </permacrud>
13574         </class>
13575
13576         <class id="cct" 
13577                 controller="open-ils.cstore open-ils.pcrud"
13578                 oils_obj:fieldmapper="config::carousel_type" 
13579                 oils_persist:tablename="config.carousel_type" 
13580                 reporter:label="Carousel Types">
13581                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13582                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13583                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13584                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13585                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13586                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13587                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13588                 </fields>
13589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13590                         <actions>
13591                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13592                                 <retrieve/>
13593                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13594                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13595                         </actions>
13596                 </permacrud>
13597         </class>
13598
13599         <class id="cc" 
13600                 controller="open-ils.cstore open-ils.pcrud"
13601                 oils_obj:fieldmapper="container::carousel" 
13602                 oils_persist:tablename="container.carousel" 
13603                 reporter:label="Carousels">
13604                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13605                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13606                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13607                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13609                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13610                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13611                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13612                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13613                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13614                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13615                         <field reporter:label="Item Libraries" name="owning_lib_filter" reporter:datatype="text" />      <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
13616                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13617                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13618                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13619                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13620                 </fields>
13621                 <links>
13622                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13623                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13624                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13625                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13626                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13627                 </links>
13628                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13629                         <actions>
13630                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13631                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13632                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13633                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13634                         </actions>
13635                 </permacrud>
13636         </class>
13637
13638         <class id="ccou" 
13639                 controller="open-ils.cstore open-ils.pcrud"
13640                 oils_obj:fieldmapper="container::carousel_org_unit" 
13641                 oils_persist:tablename="container.carousel_org_unit" 
13642                 reporter:label="Carousels Visible at Library">
13643                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13644                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13645                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13646                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13647                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13648                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13649                 </fields>
13650                 <links>
13651                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13652                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13653                 </links>
13654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13655                         <actions>
13656                                 <create permission="ADMIN_CAROUSEL">
13657                                     <context link="carousel" field="owner" />
13658                                 </create>
13659                                 <retrieve permission="ADMIN_CAROUSEL">
13660                                     <context link="carousel" field="owner" />
13661                                 </retrieve>
13662                                 <update permission="ADMIN_CAROUSEL">
13663                                     <context link="carousel" field="owner" />
13664                                 </update>
13665                                 <delete permission="ADMIN_CAROUSEL">
13666                                     <context link="carousel" field="owner" />
13667                                 </delete>
13668                         </actions>
13669                 </permacrud>
13670         </class>
13671
13672         <class id="cra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remoteauth_profile" oils_persist:tablename="config.remoteauth_profile" reporter:label="Remote Patron Authentication Configuration Profile">
13673                 <fields oils_persist:primary="name">
13674                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13675                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13676                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13677                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13678                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13679                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13680                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13681                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13682                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13683                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13684                 </fields>
13685                 <links>
13686                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13687                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13688                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13689                 </links>
13690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13691                         <actions>
13692                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13693                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13694                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13695                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13696                         </actions>
13697                 </permacrud>
13698         </class>
13699         <class id="cgs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::geolocation_service" oils_persist:tablename="config.geolocation_service" reporter:label="Geographic Location Service">
13700                 <fields oils_persist:primary="id" oils_persist:sequence="config.geolocation_service_id_seq">
13701                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
13702                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true"/>
13703                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13704                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
13705                         <field reporter:label="Service Code" name="service_code" reporter:datatype="text"/>
13706                         <field reporter:label="API Key" name="api_key" reporter:datatype="text"/>
13707                 </fields>
13708                 <links>
13709                         <link field="owner" reltype="has_a" key="id" class="aou"/>
13710                 </links>
13711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13712                         <actions>
13713                                 <create permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13714                                 <retrieve permission="VIEW_GEOLOCATION_SERVICES" global_required="true"/>
13715                                 <update permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13716                                 <delete permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13717                         </actions>
13718                 </permacrud>
13719         </class>
13720
13721         <!-- ********************************************************************************************************************* -->
13722 </IDL>
13723
13724 <!--
13725     vim:noet:ts=4:sw=4:
13726 -->