]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1921057 - Expand reporter.demographic to include detailed age breakdown
[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                         <field reporter:label="Update Bib. Edit Date" name="update_bib_editor" reporter:datatype="bool"/>
206                 </fields>
207                 <links>
208                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
209                 </links>
210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
211                         <actions>
212                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
213                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
214                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
215                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
216                         </actions>
217                 </permacrud>
218         </class>
219
220         <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">
221                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
222                         <field reporter:label="Field ID" name="id" reporter:datatype="id" reporter:selector="field"/>
223                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
224                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
225                 </fields>
226                 <links>
227                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
228                 </links>
229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
230                         <actions>
231                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
232                     <context link="grp" field="owner"/>
233                 </create>
234                                 <retrieve/>
235                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
236                     <context link="grp" field="owner"/>
237                 </update>
238                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
239                     <context link="grp" field="owner"/>
240                 </delete>
241                         </actions>
242                 </permacrud>
243         </class>
244
245         <class  id="rrbs" 
246             controller="open-ils.cstore open-ils.pcrud" 
247             oils_obj:fieldmapper="rating::record_badge_score" 
248             oils_persist:tablename="rating.record_badge_score" 
249             reporter:label="Statistical Popularity Badge">
250                 <fields oils_persist:primary="id" 
251                 oils_persist:sequence="rating.record_badge_score_id_seq">
252                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
253                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
254                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
255                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
256                 </fields>
257         <links>
258             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
259             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
260         </links>
261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
262                         <actions>
263                                 <retrieve/>
264                         </actions>
265                 </permacrud>
266         </class>
267
268         <class  id="rp" 
269             controller="open-ils.cstore open-ils.pcrud" 
270             oils_obj:fieldmapper="rating::popularity_parameter" 
271             oils_persist:tablename="rating.popularity_parameter" 
272             reporter:label="Statistical Popularity Parameter">
273                 <fields oils_persist:primary="id" 
274                 oils_persist:sequence="rating.popularity_parameter_id_seq">
275                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
276                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
277                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
278                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
279                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
280                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
281                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
282                 </fields>
283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
284                         <actions>
285                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
286                                 <retrieve/>
287                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
288                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
289                         </actions>
290                 </permacrud>
291         </class>
292
293         <class  id="rb" 
294             controller="open-ils.cstore open-ils.pcrud" 
295             oils_obj:fieldmapper="rating::badge" 
296             oils_persist:tablename="rating.badge" 
297             reporter:label="Statistical Popularity Badge">
298                 <fields oils_persist:primary="id" 
299                 oils_persist:sequence="rating.badge_id_seq">
300                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
301                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
303                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
304                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
305                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
307                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
308                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
309                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
310                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
311                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
312                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
313                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
314                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
315                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
316                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
317                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
318                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
319                 </fields>
320                 <links>
321                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
322                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
323                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
324                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
325                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
326                 </links>
327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
328                         <actions>
329                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
330                                 <retrieve/>
331                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
332                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
333                         </actions>
334                 </permacrud>
335         </class>
336
337         <class  id="vibtg" 
338             controller="open-ils.cstore open-ils.pcrud" 
339             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
340             oils_persist:tablename="vandelay.import_bib_trash_group" 
341             reporter:label="Import/Overlay Field Groups for Removal">
342                 <fields oils_persist:primary="id" 
343                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
344                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
345                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
346                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
347                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
348                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
349                 </fields>
350                 <links>
351                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
352                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
357                                 <retrieve/>
358                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364
365         <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">
366                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
367                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
368                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
369                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
370                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
371                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
372                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
373                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
374                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
375                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
376                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
377                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
378                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
379                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
380                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
382                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
383                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
384                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
385                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
386                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
387                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
388                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
389                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
390                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
391                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
392                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
393                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
394                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
395                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
396                 </fields>
397                 <links>
398                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
399                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
400                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
401                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
402                 </links>
403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
404                         <actions>
405                                 <create permission="CREATE_IMPORT_ITEM">
406                     <context link="definition" field="owner"/>
407                                 </create>
408                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
409                     <context link="definition" field="owner"/>
410                                 </retrieve>
411                                 <update permission="UPDATE_IMPORT_ITEM">
412                     <context link="definition" field="owner"/>
413                                 </update>
414                                 <delete permission="DELETE_IMPORT_ITEM">
415                     <context link="definition" field="owner"/>
416                                 </delete>
417                         </actions>
418                 </permacrud>
419         </class>
420
421         <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">
422                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
423                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
424                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
425                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
426                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
427                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
428                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
429                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
430                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
431                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
432                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
433                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
434                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
435                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
436                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
437                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
438                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
439                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
440                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
441                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
442                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
443                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
444                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
445                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
446                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
447                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
448                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
449                 </fields>
450                 <links>
451                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
452                 </links>
453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
454                         <actions>
455                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
456                                 <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"/>
457                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
459                         </actions>
460                 </permacrud>
461         </class>
462
463         <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">
464                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
465                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
466                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
467                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
468                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
469                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
470                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
471                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
472                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
473                 </fields>
474                 <links>
475                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
476                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
477                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
478                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
479                 </links>
480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
481                         <actions>
482                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
485                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
486                         </actions>
487                 </permacrud>
488         </class>
489
490         <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">
491                 <fields oils_persist:primary="code">
492                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
493                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
494                 </fields>
495                 <links>
496                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
497                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
498                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
499                 </links>
500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
501                         <actions>
502                                 <retrieve/>
503                         </actions>
504                 </permacrud>
505         </class>
506
507         <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">
508                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
509                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
510                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
512                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
513                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
514                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
515                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
516                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
517                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
518                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
519                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
522                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
523                 </fields>
524                 <links>
525                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
526                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
527                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
528                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
529             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
530             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
531             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
532                 </links>
533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
534                         <actions>
535                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
538                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
539                         </actions>
540                 </permacrud>
541         </class>
542
543         <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">
544                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
545                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
546                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
547                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
548                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
549                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
550                 </fields>
551                 <links/>
552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
553                         <actions>
554                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
555                 <retrieve/>
556                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
558                         </actions>
559                 </permacrud>
560         </class>
561
562         <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">
563                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
564                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
565                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
566                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
567                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
568                 </fields>
569                 <links>
570                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
571                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
578                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
579                         </actions>
580                 </permacrud>
581         </class>
582
583         <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">
584                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
585                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
586                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
587                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
588                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
589                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
590                 </fields>
591                 <links>
592                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
593                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
594                 </links>
595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
596                         <actions>
597                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
600                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
601                         </actions>
602                 </permacrud>
603         </class>
604
605         <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">
606                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
607                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
608                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
609                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
610                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
611                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
612                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
613                 </fields>
614                 <links>
615                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
616                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
617                 </links>
618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
619                         <actions>
620                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
624                         </actions>
625                 </permacrud>
626         </class>
627
628         <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">
629                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
630                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
631                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
633                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
634                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
635                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
636                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
637                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
638                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
639                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
641                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
642                 </fields>
643                 <links>
644                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
645                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
646                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
647             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
648             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
649                 </links>
650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
651                         <actions>
652                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
656                         </actions>
657                 </permacrud>
658         </class>
659
660         <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">
661                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
662                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
663                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
664                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
665                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
666                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
667                 </fields>
668                 <links/>
669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
670                         <actions>
671                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
672                 <retrieve/>
673                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
675                         </actions>
676                 </permacrud>
677         </class>
678
679         <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">
680                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
681                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
682                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
683                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
684                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
685                 </fields>
686                 <links>
687                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
688                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
696                         </actions>
697                 </permacrud>
698         </class>
699
700         <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">
701                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
702                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
703                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
704                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
705                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
706                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
707                 </fields>
708                 <links>
709                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
710                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
711                 </links>
712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
713                         <actions>
714                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
718                         </actions>
719                 </permacrud>
720         </class>
721
722         <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">
723                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
724                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
725                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
726                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
727                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
728                 </fields>
729                 <links>
730                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
731                 </links>
732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733                         <actions>
734                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
738                         </actions>
739                 </permacrud>
740         </class>
741
742         <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">
743                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
744                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
745                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
746                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
747                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
748                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
749                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
750                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
751             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
752                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
753                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
754                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
755                 </fields>
756                 <links>
757                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
758                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
759                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
760                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
761                 </links>
762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
763                         <actions>
764                                 <create permission="ADMIN_IMPORT_MATCH_SET">
765                     <context link="match_set" field="owner"/>
766                                 </create>
767                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
768                     <context link="match_set" field="owner"/>
769                                 </retrieve>
770                                 <update permission="ADMIN_IMPORT_MATCH_SET">
771                     <context link="match_set" field="owner"/>
772                                 </update>
773                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
774                     <context link="match_set" field="owner"/>
775                                 </delete>
776                         </actions>
777                 </permacrud>
778         </class>
779
780         <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">
781                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
782                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
783                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
784                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
785                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
786                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
787                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
788                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
789                 </fields>
790                 <links>
791                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
792                 </links>
793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
794                         <actions>
795                                 <create permission="ADMIN_IMPORT_MATCH_SET">
796                     <context link="match_set" field="owner"/>
797                                 </create>
798                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
799                     <context link="match_set" field="owner"/>
800                                 </retrieve>
801                                 <update permission="ADMIN_IMPORT_MATCH_SET">
802                     <context link="match_set" field="owner"/>
803                                 </update>
804                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
805                     <context link="match_set" field="owner"/>
806                                 </delete>
807                         </actions>
808                 </permacrud>
809         </class>
810
811         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
812                 oils_obj:fieldmapper="vandelay::session_tracker" 
813                 oils_persist:tablename="vandelay.session_tracker" 
814                 reporter:label="Vandelay Session Tracker">
815                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
818                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
819                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
820                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
821                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
822                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
823                                          queue or an auth queue and there's no IDL class for vandelay.queue .
824                                          parent table.
825                         -->
826                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
827                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
829                         <field reporter:label="State" name="state" reporter:datatype="text"/>
830                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
831                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
832                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
833                 </fields>
834                 <links>
835                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
836                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
837                 </links>
838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
839                         <actions>
840                                 <!-- created by the API -->
841                                 <retrieve global_required="true"
842                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
843                                 <update global_required="true"
844                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
845                                         <context link="workstation" field="owning_lib"/>
846                                 </update>
847                                 <delete 
848                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
849                                         <context link="workstation" field="owning_lib"/>
850                                 </delete>
851                         </actions>
852                 </permacrud>
853         </class>
854
855         <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">
856                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
857                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
858                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
859                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
860                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
861                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
862                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
863                 </fields>
864                 <links>
865                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
866                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
868                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
869                 </links>
870         </class>
871
872     <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">
873         <fields oils_persist:primary="name">
874             <field reporter:label="Name" name="name" reporter:datatype="text"/>
875             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
876             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
877             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
878         </fields>
879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
880             <actions>
881                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
885             </actions>
886         </permacrud>
887     </class>
888
889     <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">
890         <fields oils_persist:primary="id">
891             <field reporter:label="ID" name="id" reporter:datatype="id"/>
892             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
894             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
895             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
896         </fields>
897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
898             <actions>
899                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
900                 <retrieve/>
901                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
903             </actions>
904         </permacrud>
905     </class>
906
907         <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">
908                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
909                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
910                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
911                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
912                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
913                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
914                 </fields>
915                 <links>
916                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
917                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
918                 </links>
919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
920             <actions>
921                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
922                 <retrieve/>
923                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
925             </actions>
926         </permacrud>
927         </class>
928
929         <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">
930                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
931                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
932                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
933                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
934         </fields>
935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
936             <actions>
937                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
938                 <retrieve/>
939                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
940                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
941             </actions>
942         </permacrud>
943         </class>
944
945         <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">
946                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
947                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
948                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
949                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
950                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
951                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
953                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
954                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
955                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
956                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
957                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
958         </fields>
959                 <links>
960                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
961                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
962         </links>
963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
964             <actions>
965                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
966                 <retrieve/>
967                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
968                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
969             </actions>
970         </permacrud>
971         </class>
972
973         <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">
974                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
975                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
976                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
977                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
980                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
981                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
982                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
983                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
984                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
985         </fields>
986                 <links>
987                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
988                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
989         </links>
990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991             <actions>
992                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
993                 <retrieve/>
994                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
995                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
996             </actions>
997         </permacrud>
998         </class>
999
1000         <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">
1001                 <fields oils_persist:primary="name">
1002                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1003                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1004                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1005                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1006                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1007                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1008                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1009                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1010                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1011                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1012                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1013                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1014                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1015                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1016                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1017                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1018                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1019                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1020                 </fields>
1021                 <links>
1022                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1023                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1024                 </links>
1025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1026             <actions>
1027                 <create permission="ADMIN_SVF" global_required="true"/>
1028                 <retrieve/>
1029                 <update permission="ADMIN_SVF" global_required="true"/>
1030                 <delete permission="ADMIN_SVF" global_required="true"/>
1031             </actions>
1032         </permacrud>
1033         </class>
1034
1035         <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">
1036                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1037                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1038                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1039                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1040             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1041                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1042                 </fields>
1043                 <links/>
1044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1045             <actions>
1046                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1047                 <retrieve/>
1048                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1050             </actions>
1051         </permacrud>
1052         </class>
1053
1054         <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">
1055                 <fields oils_persist:primary="coded_value">
1056                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1057                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1058                 </fields>
1059                 <links>
1060                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1061                 </links>
1062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1063             <actions>
1064                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1065                 <retrieve/>
1066                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1067                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1068             </actions>
1069         </permacrud>
1070         </class>
1071
1072         <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">
1073                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1074                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1075                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1076                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1077                 </fields>
1078                 <links>
1079                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1080                 </links>
1081         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1082             <actions>
1083                 <retrieve/>
1084             </actions>
1085         </permacrud>
1086         </class>
1087
1088
1089         <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">
1090                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1091                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1092                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1093                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1094                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1098                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1099                 </links>
1100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1101             <actions>
1102                 <retrieve/>
1103             </actions>
1104         </permacrud>
1105         </class>
1106
1107
1108         <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">
1109                 <fields oils_persist:primary="source">
1110                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1111                         <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 -->
1112                 </fields>
1113                 <links>
1114                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1115                 </links>
1116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1117             <actions>
1118                 <retrieve/>
1119             </actions>
1120         </permacrud>
1121         </class>
1122
1123         <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">
1124                 <fields>
1125                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1126                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1127                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1128                 </fields>
1129                 <links>
1130                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1131                 </links>
1132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1133             <actions>
1134                 <retrieve/>
1135             </actions>
1136         </permacrud>
1137         </class>
1138
1139         <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">
1140                 <fields oils_persist:primary="id">
1141                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1142                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1143                 </fields>
1144                 <links>
1145                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1146                 </links>
1147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1148             <actions>
1149                 <retrieve/>
1150             </actions>
1151         </permacrud>
1152         </class>
1153
1154         <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">
1155                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1156                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1157                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1158                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1159                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1160                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1161                 </fields>
1162                 <links>
1163                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1164                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1165                 </links>
1166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1167             <actions>
1168                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1169                 <retrieve/>
1170                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1172             </actions>
1173         </permacrud>
1174         </class>
1175
1176         <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">
1177                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1178                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1179                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1180                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1181                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1182                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1183                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1184                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1185             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1186             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1187             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1188                 </fields>
1189                 <links>
1190                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1191                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1192                 </links>
1193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1194             <actions>
1195                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1196                 <retrieve/>
1197                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1198                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1199             </actions>
1200         </permacrud>
1201         </class>
1202
1203         <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">
1204                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1205                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1206                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1207                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1208                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1209                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1210                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1211                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1212                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1213                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1214                 </fields>
1215                 <links>
1216                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1217                 </links>
1218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1219             <actions>
1220                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1224             </actions>
1225         </permacrud>
1226         </class>
1227
1228     <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">
1229         <fields oils_persist:primary="name">
1230             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1231             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1232             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1233             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1234             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1235             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1236             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1237             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1238             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1239             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1240         </fields>
1241         <links>
1242             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1243             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1244         </links>
1245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1246             <actions>
1247                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1248                 <retrieve/>
1249                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1251             </actions>
1252         </permacrud>
1253     </class>
1254
1255     <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">
1256         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1257             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1258             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1259             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1260             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1261             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1262             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1263             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1264         </fields>
1265         <links>
1266             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1267         </links>
1268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1269             <actions>
1270                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1271                 <retrieve/>
1272                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1274             </actions>
1275         </permacrud>
1276     </class>
1277
1278     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1279                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1280                         oils_persist:tablename="config.z3950_index_field_map" 
1281                         reporter:label="Z39.50 Index Field Map">
1282         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1283             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1284             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1285             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1286             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1288             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1289         </fields>
1290         <links>
1291             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1292             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1293             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1294         </links>
1295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1296             <actions>
1297                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1298                 <retrieve/>
1299                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1301             </actions>
1302         </permacrud>
1303     </class>
1304
1305
1306         <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">
1307                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1308                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1309                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1310                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1311                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1312                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1314                 </fields>
1315                 <links>
1316             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1317             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1318                 </links>
1319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1320                         <actions>
1321                                 <retrieve/>
1322                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1323                         </actions>
1324                 </permacrud>
1325         </class>
1326
1327         <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">
1328                 <fields oils_persist:primary="key">
1329                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1330                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1331                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1332                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1333                 </fields>
1334                 <links/>
1335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1336                         <actions>
1337                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1338                                 <retrieve/>
1339                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1340                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1341                         </actions>
1342                 </permacrud>
1343         </class>
1344
1345         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1346                 <fields oils_persist:primary="module">
1347                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1348                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1349                 </fields>
1350                 <links/>
1351         </class>
1352
1353         <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">
1354                 <fields oils_persist:primary="module">
1355                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1356                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1357                 </fields>
1358                 <links/>
1359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1360                         <actions>
1361                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1362                                 <retrieve/>
1363                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1364                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1365                         </actions>
1366                 </permacrud>
1367         </class>
1368
1369         <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">
1370                 <fields oils_persist:primary="module">
1371                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1372                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1373                 </fields>
1374                 <links/>
1375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1376                         <actions>
1377                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1378                                 <retrieve/>
1379                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1380                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1381                         </actions>
1382                 </permacrud>
1383         </class>
1384
1385         <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">
1386                 <fields oils_persist:primary="module">
1387                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1388                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1389                 </fields>
1390                 <links/>
1391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1392                         <actions>
1393                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1394                                 <retrieve/>
1395                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1396                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1397                         </actions>
1398                 </permacrud>
1399         </class>
1400
1401         <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">
1402                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1403                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1404                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1405                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1406                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1407                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1408                 </fields>
1409                 <links>
1410                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1411                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1412                 </links>
1413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1414                         <actions>
1415                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1416                     <context link="event_def" field="owner"/>
1417                 </create>
1418                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1419                     <context link="event_def" field="owner"/>
1420                 </retrieve>
1421                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1422                     <context link="event_def" field="owner"/>
1423                 </update>
1424                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1425                     <context link="event_def" field="owner"/>
1426                 </delete>
1427                         </actions>
1428                 </permacrud>
1429         </class>
1430
1431         <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">
1432                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1433                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1434                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1435                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1436                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1437                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1438                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1439                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1440                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1441                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1442                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1443                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1444                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1445                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1446                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1447                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1448                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1449                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1450                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1451                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1452                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1453                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1454                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1455                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1456                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1457                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1458                         <field reporter:label="Context User Path" name="context_usr_path" reporter:datatype="text"/>
1459                         <field reporter:label="Context Library Path" name="context_library_path" reporter:datatype="text"/>
1460                         <field reporter:label="Context Bib Path" name="context_bib_path" reporter:datatype="text"/>
1461                         <field reporter:label="Context Item Path" name="context_item_path" reporter:datatype="text"/>
1462                 </fields>
1463                 <links>
1464                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1465                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1466                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1467                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1468                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1469                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1470                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1471                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1472                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1473                 </links>
1474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1475                         <actions>
1476                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1477                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1478                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1479                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1480                         </actions>
1481                 </permacrud>
1482         </class>
1483
1484         <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">
1485                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_id_seq">
1486                         <field reporter:label="Group ID" name="id" reporter:datatype="id"/>
1487                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1488                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1489                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1490                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1491                         <field reporter:label="Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
1492                 </fields>
1493                 <links>
1494                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1495                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1496                         <link field="members" reltype="has_many" key="grp" map="" class="atevdefgm"/>
1497                 </links>
1498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1499                         <actions>
1500                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1501                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1502                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1503                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1504                         </actions>
1505                 </permacrud>
1506         </class>
1507
1508         <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">
1509                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_member_id_seq">
1510                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1511                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1512                         <field reporter:label="Group" name="grp"  reporter:datatype="link"/>
1513                         <field reporter:label="Event Definition" name="event_def"  reporter:datatype="link"/>
1514                         <field reporter:label="Sortable" name="sortable" reporter:datatype="bool"/>
1515                         <field reporter:label="Include Holdings" name="holdings" reporter:datatype="bool"/>
1516                         <field reporter:label="Externally Processed" name="external" reporter:datatype="bool"/>
1517                 </fields>
1518                 <links>
1519                         <link field="grp" reltype="has_a" key="id" map="" class="atevdefg"/>
1520                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1521                 </links>
1522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1523                         <actions>
1524                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1525                     <context link="grp" field="owner"/>
1526                 </create>
1527                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1528                     <context link="grp" field="owner"/>
1529                 </retrieve>
1530                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1531                     <context link="grp" field="owner"/>
1532                 </update>
1533                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1534                     <context link="grp" field="owner"/>
1535                 </delete>
1536                         </actions>
1537                 </permacrud>
1538         </class>
1539
1540         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1541                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1542                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1543                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1544                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1545                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1546                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1547                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1548                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1549                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1550                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1551                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1552                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1553                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1554                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1555                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1556                         <field reporter:label="Context User" name="context_user" reporter:datatype="link"/>
1557                         <field reporter:label="Context Library" name="context_library" reporter:datatype="link"/>
1558                         <field reporter:label="Context Bib" name="context_bib" reporter:datatype="link"/>
1559                         <field reporter:label="Context Item" name="context_item" reporter:datatype="link"/>
1560                 </fields>
1561                 <links>
1562                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1563                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1564                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1565                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1566                         <link field="context_user" reltype="has_a" key="id" map="" class="au"/>
1567                         <link field="context_library" reltype="has_a" key="id" map="" class="aou"/>
1568                         <link field="context_bib" reltype="has_a" key="id" map="" class="bre"/>
1569                         <link field="context_item" reltype="has_a" key="id" map="" class="acp"/>
1570                 </links>
1571         </class>
1572
1573         <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">
1574                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1575                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1576                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1577                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1578                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1579                 </fields>
1580                 <links>
1581                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1582                 </links>
1583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1584                         <actions>
1585                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1586                     <context link="event_def" field="owner"/>
1587                 </create>
1588                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1589                     <context link="event_def" field="owner"/>
1590                 </retrieve>
1591                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1592                     <context link="event_def" field="owner"/>
1593                 </update>
1594                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1595                     <context link="event_def" field="owner"/>
1596                 </delete>
1597                         </actions>
1598                 </permacrud>
1599         </class>
1600
1601         <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">
1602                 <oils_persist:source_definition><![CDATA[
1603                 SELECT  atevdef.hook,
1604                         atevdef.name,
1605                         atevdef.reactor,
1606                         atev.id,
1607                         atev.event_def,
1608                         atev.add_time,
1609                         atev.run_time,
1610                         atev.start_time,
1611                         atev.update_time,
1612                         atev.complete_time,
1613                         atev.update_process,
1614                         atev.state,
1615                         atev.user_data,
1616                         atev.template_output,
1617                         atev.error_output,
1618                         atev.async_output,
1619                         targ_circ.id AS target_circ,
1620                         targ_ahr.id AS target_hold,
1621                         COALESCE(
1622                                 targ_circ.circ_lib,
1623                                 targ_ahr.pickup_lib
1624                         ) AS perm_lib
1625                 FROM action_trigger.event atev
1626                 JOIN action_trigger.event_definition atevdef ON
1627                         (atevdef.id = atev.event_def)
1628                 JOIN action_trigger.hook ath ON
1629                         (ath.key = atevdef.hook)
1630                 LEFT JOIN action.circulation targ_circ ON
1631                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1632                 LEFT JOIN action.hold_request targ_ahr ON
1633                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1634                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1635                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1636                                 'circ.staff.max_visible_event_age',
1637                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1638                         ) UNION
1639                         SELECT '1000 YEARS'::INTERVAL AS value
1640                 ) ous)
1641                 ]]></oils_persist:source_definition>
1642                 <fields oils_persist:primary="id">
1643                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1644                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1645                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1646                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1647                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1648                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1649                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1650                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1651                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1652                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1653                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1654                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1655                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1656                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1657                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1658                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1659                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1660                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1661                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1662                 </fields>
1663                 <links>
1664                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1665                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1666                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1667                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1668                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1669                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1670                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1671                 </links>
1672                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1673                         <actions>
1674                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1675                         </actions>
1676                 </permacrud>
1677         </class>
1678
1679         <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">
1680                 <oils_persist:source_definition><![CDATA[
1681                 SELECT  atevdef.hook,
1682                         atevdef.name,
1683                         atevdef.reactor,
1684                         atev.id,
1685                         atev.event_def,
1686                         atev.add_time,
1687                         atev.run_time,
1688                         atev.start_time,
1689                         atev.update_time,
1690                         atev.complete_time,
1691                         atev.update_process,
1692                         atev.state,
1693                         atev.user_data,
1694                         atev.template_output,
1695                         atev.error_output,
1696                         atev.async_output,
1697             atev.target,
1698                         CASE WHEN ath.core_type = 'circ' THEN atev.target END AS target_circ,
1699                         CASE WHEN ath.core_type = 'ahr' THEN atev.target END AS target_hold,
1700             atev.context_user,
1701                         atev.context_library,
1702             atev.context_bib,
1703             atev.context_item,
1704             rssr.title,
1705             rssr.author
1706                 FROM action_trigger.event atev
1707                 JOIN action_trigger.event_definition atevdef ON
1708                         (atevdef.id = atev.event_def)
1709                 JOIN action_trigger.hook ath ON
1710                         (ath.key = atevdef.hook AND ath.core_type IN ('circ','ahr'))
1711         LEFT JOIN reporter.super_simple_record rssr ON
1712             (atev.context_bib = rssr.id)
1713                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1714                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1715                                 'circ.staff.max_visible_event_age',
1716                                 atev.context_library
1717                         ) UNION
1718                         SELECT '1000 YEARS'::INTERVAL AS value
1719                 ) ous)
1720                 ]]></oils_persist:source_definition>
1721                 <fields oils_persist:primary="id">
1722                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1723                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1724                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1725                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1726                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1727                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1728                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1729                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1730                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1731                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1732                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1733                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1734                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1735                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1736                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1737                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1738                         <field reporter:label="Event Target Object ID" name="target" reporter:datatype="link" />
1739                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1740                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1741                         <field reporter:label="Context User" name="context_user" reporter:datatype="link" />
1742                         <field reporter:label="Context Library" name="context_library" reporter:datatype="org_unit" />
1743                         <field reporter:label="Context Bib" name="context_bib" reporter:datatype="link" />
1744                         <field reporter:label="Context Item" name="context_item" reporter:datatype="link" />
1745                         <field reporter:label="Title" name="title" reporter:datatype="text" />
1746                         <field reporter:label="Author" name="author" reporter:datatype="text" />
1747                 </fields>
1748                 <links>
1749                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1750                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1751                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1752                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1753                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1754                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1755                         <link field="context_user" reltype="has_a" key="id" map="" class="au" />
1756                         <link field="context_library" reltype="has_a" key="id" map="" class="aou" />
1757                         <link field="context_bib" reltype="has_a" key="id" map="" class="bre" />
1758                         <link field="context_item" reltype="has_a" key="id" map="" class="acp" />
1759                 </links>
1760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1761                         <actions>
1762                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="context_library" />
1763                         </actions>
1764                 </permacrud>
1765         </class>
1766
1767         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1768                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1769                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1770                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1771                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1772                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1773                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1774                 </fields>
1775                 <links>
1776                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1777                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1778                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1779                 </links>
1780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1781                         <actions>
1782                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1783                         </actions>
1784                 </permacrud>
1785         </class>
1786
1787         <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">
1788                 <fields oils_persist:primary="code">
1789                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1790                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1791                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1792                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1793                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1794                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1795                 </fields>
1796                 <links/>
1797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1798             <actions>
1799                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1800                 <retrieve/>
1801                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1802                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1803             </actions>
1804         </permacrud>
1805         </class>
1806
1807         <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">
1808                 <fields oils_persist:primary="code">
1809                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1810                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1811                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1812                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1813                 </fields>
1814                 <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1820                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823         </class>
1824
1825         <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">
1826                 <fields oils_persist:primary="code">
1827                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1828                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1829                 </fields>
1830                 <links/>
1831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1832             <actions>
1833                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1834                 <retrieve/>
1835                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1836                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1837             </actions>
1838         </permacrud>
1839         </class>
1840
1841         <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">
1842                 <fields oils_persist:primary="code">
1843                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1844                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1845                 </fields>
1846                 <links/>
1847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1848             <actions>
1849                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1850                 <retrieve/>
1851                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1852                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1853             </actions>
1854         </permacrud>
1855         </class>
1856
1857         <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">
1858                 <fields oils_persist:primary="code">
1859                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1860                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1861                 </fields>
1862                 <links/>
1863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1864             <actions>
1865                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1866                 <retrieve/>
1867                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1868                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1869             </actions>
1870         </permacrud>
1871         </class>
1872
1873         <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">
1874                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1875                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1876                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1877                 </fields>
1878                 <links/>
1879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1880             <actions>
1881                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1882                 <retrieve/>
1883                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1884                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1885             </actions>
1886         </permacrud>
1887         </class>
1888
1889         <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">
1890                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1891                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1892                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1893                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1894                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1895                 </fields>
1896         <links>
1897             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1898             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1899             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1900         </links>
1901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1902             <actions>
1903                 <create permission="UPDATE_COPY">
1904                     <context link="target_copy" field="circ_lib"/>
1905                 </create>
1906                 <retrieve/>
1907                 <update permission="UPDATE_COPY">
1908                     <context link="target_copy" field="circ_lib"/>
1909                 </update>
1910                 <delete permission="UPDATE_COPY">
1911                     <context link="target_copy" field="circ_lib"/>
1912                 </delete>
1913             </actions>
1914         </permacrud>
1915         </class>
1916
1917         <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">
1918                 <fields oils_persist:primary="code">
1919                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1920                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1921                 </fields>
1922                 <links/>
1923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1924             <actions>
1925                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1926                 <retrieve/>
1927                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1928                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1929             </actions>
1930         </permacrud>
1931         </class>
1932
1933         <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">
1934                 <fields oils_persist:primary="code">
1935                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1936                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1937                 </fields>
1938                 <links/>
1939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1940             <actions>
1941                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1942                 <retrieve/>
1943                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1944                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1945             </actions>
1946         </permacrud>
1947         </class>
1948
1949         <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">
1950                 <fields oils_persist:primary="code">
1951                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1952                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1953                 </fields>
1954                 <links/>
1955         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1956             <actions>
1957                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1958                 <retrieve/>
1959                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1960                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1961             </actions>
1962         </permacrud>
1963         </class>
1964
1965     <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">
1966         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1967             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1968             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1969             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1970             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1971             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1972             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1973             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1974             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1975             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1976             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1977             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1978             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1979             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1980             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1981             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1982             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1983             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1984         </fields>
1985         <links/>
1986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1987             <actions>
1988                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1989                 <retrieve/>
1990                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1991                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1992             </actions>
1993         </permacrud>
1994     </class>
1995
1996     <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">
1997         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1998             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1999             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2000             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
2001             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
2002             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
2003             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
2004             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
2005             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
2006             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
2007             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
2008             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
2009             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
2010             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
2011             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
2012             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
2013             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
2014             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
2015             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
2016             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
2017         </fields>
2018         <links/>
2019         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2020             <actions>
2021                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2022                 <retrieve/>
2023                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2024                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <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">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
2031             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2033             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
2034             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
2035             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
2036         </fields>
2037         <links>
2038             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2039             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
2040             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
2041         </links>
2042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2043             <actions>
2044                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2045                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2046                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2047                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2048             </actions>
2049         </permacrud>
2050     </class>
2051
2052         <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">
2053                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
2054                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2055                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2056                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
2057                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
2058                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
2059                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
2060                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
2061                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
2062                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
2063                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
2064                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2065                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2066                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2067                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2068                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2069                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2070             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2071                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
2072                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
2073                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
2074                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
2075                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
2076                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
2077                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2078                 </fields>
2079                 <links>
2080                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2081                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
2082                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
2083                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
2084                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
2085                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
2086                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
2087                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2088                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2089                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2090                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2091                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2092                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
2093             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
2094                 </links>
2095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2096             <actions>
2097                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2098                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2099                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2100                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2101             </actions>
2102         </permacrud>
2103         </class>
2104
2105         <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">
2106                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
2107                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2108                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
2109                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2110                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
2111                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
2112                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
2113                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
2114                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
2115                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2116                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
2117                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2118                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2119                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2120                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2121                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2122             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
2123                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
2124                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
2125             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2126                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
2127                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
2128                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2129                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2130             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2131             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
2132             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
2133                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
2134                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
2135                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
2136                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2137                 </fields>
2138                 <links>
2139                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2140                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2141                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2142                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2143                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2144                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2145                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2146                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2147                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2148                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2149                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2150                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
2151                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
2152                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
2153             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2154                 </links>
2155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2156             <actions>
2157                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2158                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2159                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2160                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2161             </actions>
2162         </permacrud>
2163         </class>
2164
2165     <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">
2166         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2167             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2168             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2169             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2170         </fields>
2171         <links/>
2172         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2173             <actions>
2174                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2175                 <retrieve/>
2176                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2177                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2178             </actions>
2179         </permacrud>
2180     </class>
2181
2182     <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">
2183         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2184             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2185             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2186             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2187             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2188             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2189             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2190             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2191         </fields>
2192         <links>
2193             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2194         </links>
2195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2196             <actions>
2197                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2198                 <retrieve/>
2199                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2200                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2201             </actions>
2202         </permacrud>
2203     </class>
2204
2205     <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">
2206         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2207             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2208             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2209             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2210             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2211             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2212         </fields>
2213         <links>
2214             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2215             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2216         </links>
2217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218             <actions>
2219                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2220                     <context link="matchpoint" field="org_unit"/>
2221                 </create>
2222                 <retrieve/>
2223                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2224                     <context link="matchpoint" field="org_unit"/>
2225                 </update>
2226                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2227                     <context link="matchpoint" field="org_unit"/>
2228                 </delete>
2229             </actions>
2230         </permacrud>
2231     </class>
2232
2233     <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">
2234         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2235             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2236             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2237             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2238         </fields>
2239         <links>
2240             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2241             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2242         </links>
2243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2244             <actions>
2245                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2246                     <context link="limit_set" field="owning_lib"/>
2247                 </create>
2248                 <retrieve/>
2249                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2250                     <context link="limit_set" field="owning_lib"/>
2251                 </update>
2252                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2253                     <context link="limit_set" field="owning_lib"/>
2254                 </delete>
2255             </actions>
2256         </permacrud>
2257     </class>
2258     <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">
2259         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2260             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2261             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2262             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2263         </fields>
2264         <links>
2265             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2266             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2267         </links>
2268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2269             <actions>
2270                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2271                     <context link="limit_set" field="owning_lib"/>
2272                 </create>
2273                 <retrieve/>
2274                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2275                     <context link="limit_set" field="owning_lib"/>
2276                 </update>
2277                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2278                     <context link="limit_set" field="owning_lib"/>
2279                 </delete>
2280             </actions>
2281         </permacrud>
2282     </class>
2283
2284     <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">
2285         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2286             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2287             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2288             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2289             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2290         </fields>
2291         <links>
2292             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2293             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2294         </links>
2295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2296             <actions>
2297                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2298                     <context link="limit_set" field="owning_lib"/>
2299                 </create>
2300                 <retrieve/>
2301                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2302                     <context link="limit_set" field="owning_lib"/>
2303                 </update>
2304                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2305                     <context link="limit_set" field="owning_lib"/>
2306                 </delete>
2307             </actions>
2308         </permacrud>
2309     </class>
2310
2311         <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">
2312                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2313                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2314                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2315                 </fields>
2316                 <links/>
2317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2318             <actions>
2319                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2320                 <retrieve/>
2321                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2322                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2323             </actions>
2324         </permacrud>
2325         </class>
2326
2327         <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">
2328                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2329                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2330                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2331                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2332                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2333                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2334                 </fields>
2335                 <links>
2336                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2337                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2338                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2339                 </links>
2340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2341             <actions>
2342                 <create permission="ADMIN_SURVEY">
2343                     <context link="survey" field="owner"/>
2344                 </create>
2345                 <retrieve/>
2346                 <update permission="ADMIN_SURVEY">
2347                     <context link="survey" field="owner"/>
2348                 </update>
2349                 <delete permission="ADMIN_SURVEY">
2350                     <context link="survey" field="owner"/>
2351                 </delete>
2352             </actions>
2353         </permacrud>
2354         </class>
2355         <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">
2356                 <fields oils_persist:primary="id" oils_persist:sequence="">
2357                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2358                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2360                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2361                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2362                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2363                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2365                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2366                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2367                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2368                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2369                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2370                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2371                 </fields>
2372                 <links>
2373                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2374                 </links>
2375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2376                         <actions>
2377                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2378                                         <context link="usr" field="home_ou" />
2379                                 </retrieve>
2380                         </actions>
2381                 </permacrud>
2382         </class>
2383         <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">
2384                 <fields oils_persist:primary="id" oils_persist:sequence="">
2385                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2386                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2387                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2388                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2389                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2390                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2391                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2393                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2394                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2395                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2396                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2397                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2398                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2399                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2400                 </fields>
2401                 <links>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2404                 </links>
2405         </class>
2406         <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">
2407                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2408                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2409                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2410                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2411                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2412                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2413                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2414                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2415                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2416                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2417                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2418                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2419                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2420                 </fields>
2421                 <links>
2422                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2423                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2424                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2425                 </links>
2426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2427                         <actions> <!-- created magically, so no create action -->
2428                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2429                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2430                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2431                         </actions>
2432                 </permacrud>
2433         </class>
2434         <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)">
2435                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2436                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2437                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2438                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2439                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2440                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2441                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2442                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2443                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2444                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2445                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2446                         <field reporter:label="Editor" name="usr" reporter:datatype="link" />
2447                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2448                 </fields>
2449                 <links>
2450                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2451                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2452                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2453                 </links>
2454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2455                         <actions> <!-- created magically, so no create action -->
2456                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2457                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2458                         </actions>
2459                 </permacrud>
2460         </class>
2461         <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">
2462         <fields oils_persist:primary="id">
2463                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2464                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2465                         <field reporter:label="Debug: Set Date (Penalty)" name="ausp_set_date" reporter:datatype="timestamp"/>
2466                         <field reporter:label="Debug: Creation Date/Time (Message)" name="aum_create_date" reporter:datatype="timestamp"/>
2467                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2468                         <field reporter:label="Creating Library" name="org_unit" reporter:datatype="link"/>
2469                         <field reporter:label="Debug: Creating Library (Penalty)" name="ausp_org_unit" reporter:datatype="link"/>
2470                         <field reporter:label="Debug: Creating Library (Message)" name="aum_sending_lib" reporter:datatype="link"/>
2471                         <field reporter:label="Debug: Penalty ID" name="ausp_id" reporter:datatype="id" />
2472                         <field reporter:label="Debug: Message ID" name="aum_id" reporter:datatype="id" />
2473                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2474                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2475                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2476                         <field reporter:label="Debug: User (Penalty)" name="ausp_usr" reporter:datatype="link" />
2477                         <field reporter:label="Debug: User (Message)" name="aum_usr" reporter:datatype="link" />
2478                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2479                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2480                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2481                         <field reporter:label="Debug: Stop Date/Time (Penalty)" name="ausp_stop_date" reporter:datatype="timestamp"/>
2482                         <field reporter:label="Debug: Stop Date/Time (Message)" name="aum_stop_date" reporter:datatype="timestamp"/>
2483                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2484                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2485                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2486                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2487                         <field name="ausp_usr_message" reporter:datatype="link" reporter:label="Debug: User Message (Penalty)"/>
2488                 </fields>
2489                 <links>
2490                         <link field="ausp_id" reltype="has_a" key="id" map="" class="ausp"/>
2491                         <link field="aum_id" reltype="has_a" key="id" map="" class="aum"/>
2492                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2493                         <link field="ausp_usr" reltype="has_a" key="id" map="" class="au"/>
2494                         <link field="aum_usr" reltype="has_a" key="id" map="" class="au"/>
2495                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2496                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2497                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2498                         <link field="aum_sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2499                         <link field="ausp_org_unit" reltype="has_a" key="id" map="" class="aou"/>
2500                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2501                         <link field="ausp_usr_message" reltype="has_a" key="id" map="" class="aum"/>
2502                 </links>
2503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2504                         <actions> <!-- created magically, so no create action -->
2505                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2506                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2507                         </actions>
2508                 </permacrud>
2509         </class>
2510
2511         <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">
2512                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2513                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2514                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2515                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2516                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2517                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2518                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2519                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2520                 </fields>
2521                 <links>
2522                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2523                 </links>
2524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2525                         <actions>
2526                                 <create permission="UPDATE_USER">
2527                                         <context link="usr" field="home_ou"/>
2528                                 </create>
2529                                 <retrieve permission="VIEW_USER">
2530                                         <context link="usr" field="home_ou"/>
2531                                 </retrieve>
2532                                 <update permission="UPDATE_USER">
2533                                         <context link="usr" field="home_ou"/>
2534                                 </update>
2535                                 <delete permission="UPDATE_USER">
2536                                         <context link="usr" field="home_ou"/>
2537                                 </delete>
2538                         </actions>
2539                 </permacrud>
2540         </class>
2541         <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">
2542                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2543                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2544                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2545                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2546                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2547                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2548                 </fields>
2549                 <links>
2550                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2551                 </links>
2552         </class>
2553         <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">
2554                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2555                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2556                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2557                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2558                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2559                 </fields>
2560                 <links>
2561                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2562                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2563                 </links>
2564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2565                         <actions>
2566                                 <retrieve permission="VIEW_USER">
2567                                         <context link="usr" field="home_ou" />
2568                                 </retrieve>
2569                         </actions>
2570                 </permacrud>
2571         </class>
2572         <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">
2573                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2574                         <field name="field" reporter:datatype="link"/>
2575                         <field name="id" reporter:datatype="id" />
2576                         <field name="source" reporter:datatype="link"/>
2577                         <field name="value" reporter:datatype="text"/>
2578                 </fields>
2579                 <links>
2580                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2581                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2582                 </links>
2583         </class>
2584         <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">
2585                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2586                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2587                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2588                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2589                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2590                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2591                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2592                 </fields>
2593                 <links>
2594                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2595                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2596                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2597                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2598                 </links>
2599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2600                         <actions>
2601                                 <retrieve/>
2602                         </actions>
2603                 </permacrud>
2604         </class>
2605         <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">
2606                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2607                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2608                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2609                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2610                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2611                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2612                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2613                 </fields>
2614                 <links>
2615                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2616                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2617                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2618                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2619                 </links>
2620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2621                         <actions>
2622                                 <retrieve/>
2623                         </actions>
2624                 </permacrud>
2625         </class>
2626         <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">
2627                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2628                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2629                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2630                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2631                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2632                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2633                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2634                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2635                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2636                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2637                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2638                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2639                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2640                 </fields>
2641                 <links>
2642                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2643                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2644                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2645                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2646                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2647                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2648                 </links>
2649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2650             <actions>
2651                 <create permission="TRANSIT_COPY" context_field="owner">
2652                     <context link="target_copy" field="circ_lib"/>
2653                 </create>
2654                 <retrieve/>
2655                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2656                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2657             </actions>
2658         </permacrud>
2659         </class>
2660         <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">
2661                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2662                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2663                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2664                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2665                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2666                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2667                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2668                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2669                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2670                 </fields>
2671                 <links>
2672                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2673                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2674                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2675                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2676                 </links>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="ADMIN_SURVEY">
2680                     <context link="survey" field="owner"/>
2681                 </create>
2682                 <retrieve permission="VIEW_USER">
2683                     <context link="usr" field="home_ou"/>
2684                 </retrieve>
2685                 <update permission="ADMIN_SURVEY">
2686                     <context link="survey" field="owner"/>
2687                 </update>
2688                 <delete permission="ADMIN_SURVEY">
2689                     <context link="survey" field="owner"/>
2690                 </delete>
2691             </actions>
2692         </permacrud>
2693         </class>
2694         <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">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2696                         <field name="bucket" />
2697                         <field name="id" reporter:datatype="id" />
2698                         <field name="target_copy" reporter:datatype="link"/>
2699                         <field name="create_time" reporter:datatype="timestamp" />
2700                         <field name="pos" reporter:datatype="int" />
2701                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2702                 </fields>
2703                 <links>
2704                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2705                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2706             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2707                 </links>
2708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2709                         <actions>
2710                                 <retrieve permission="ADMIN_COPY_BUCKET">
2711                     <context link="bucket" owning_lib="owning_lib"/>
2712                 </retrieve>
2713             </actions>
2714         </permacrud>
2715         </class>
2716         <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">
2717                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2718                         <field name="id" reporter:datatype="id" />
2719                         <field name="item" reporter:datatype="link"/>
2720                         <field name="note" reporter:datatype="text" />
2721                 </fields>
2722                 <links>
2723                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2724                 </links>
2725         </class>
2726
2727         <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">
2728                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2729                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2730                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2731                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2732                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2733                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2734                 </fields>
2735                 <links>
2736                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2737                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2738                 </links>
2739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2740                         <actions>
2741                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2742                                 <retrieve/>
2743                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2744                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2745                         </actions>
2746                 </permacrud>
2747         </class>
2748
2749         <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">
2750                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2751                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2752                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2753                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2754                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2755                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2756                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2757                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2758                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2759                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2760                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2761                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2762                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2763                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2764                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2765                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2766                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2767                 </fields>
2768                 <links>
2769                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2770                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2771                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2772                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2773                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2774                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2775                         <link field="heading_field" reltype="has_a" key="id" map="" class="ahf"/>
2776                 </links>
2777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2778                         <actions>
2779                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2780                                 <retrieve/>
2781                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2782                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2783                         </actions>
2784                 </permacrud>
2785         </class>
2786
2787         <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">
2788                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2789                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2790                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2791                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2792                 </fields>
2793                 <links>
2794                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2795                 </links>
2796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2797                         <actions>
2798                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2799                                 <retrieve/>
2800                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2801                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2802                         </actions>
2803                 </permacrud>
2804         </class>
2805
2806         <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">
2807                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2808                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2809                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2810                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2811                 </fields>
2812                 <links>
2813                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2814                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2815                 </links>
2816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2817                         <actions>
2818                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2819                                 <retrieve/>
2820                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2821                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2822                         </actions>
2823                 </permacrud>
2824         </class>
2825
2826         <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">
2827                 <fields oils_persist:primary="code">
2828                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2829                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2830                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2831                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2832                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2833                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2834                 </fields>
2835                 <links>
2836                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2837                 </links>
2838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2839                         <actions>
2840                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2841                                 <retrieve/>
2842                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2843                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2844                         </actions>
2845                 </permacrud>
2846         </class>
2847
2848         <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">
2849                 <fields oils_persist:primary="code">
2850                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2851                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2852                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2853                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2854                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2855                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2856                 </fields>
2857                 <links>
2858                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2859                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2860                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2861                 </links>
2862                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2863                         <actions>
2864                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2865                                 <retrieve/>
2866                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2867                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2868                         </actions>
2869                 </permacrud>
2870         </class>
2871
2872     <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">
2873         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2874             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2875             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2876             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2877         </fields>
2878         <links>
2879             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2880             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2881         </links>
2882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2883             <actions>
2884                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2885                 <retrieve/>
2886                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2887                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2888             </actions>
2889         </permacrud>
2890     </class>
2891
2892         <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">
2893                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2894                         <field name="active" reporter:datatype="bool"/>
2895                         <field name="create_date" reporter:datatype="timestamp"/>
2896                         <field name="creator" />
2897                         <field name="deleted" reporter:datatype="bool"/>
2898                         <field name="edit_date" reporter:datatype="timestamp"/>
2899                         <field name="editor" />
2900                         <field name="id" reporter:datatype="id" />
2901                         <field name="last_xact_id" />
2902                         <field name="marc" />
2903                         <field name="source" />
2904                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2905                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2906                         <field name="heading" />
2907                         <field name="simple_heading" />
2908                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2909                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2910                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2911                 </fields>
2912                 <links>
2913                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2915                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2916                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2917                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2918                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2919                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2920                 </links>
2921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2922                         <actions>
2923                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2924                                 <retrieve/>
2925                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2926                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2927                         </actions>
2928                 </permacrud>
2929         </class>
2930         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2931                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2932                         <field name="char_encoding" />
2933                         <field name="id" />
2934                         <field name="record" />
2935                         <field name="record_status" />
2936                         <field name="thesaurus" />
2937                 </fields>
2938                 <links>
2939                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2940                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2941                 </links>
2942         </class>
2943         <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">
2944                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2945                         <field name="id" reporter:datatype="id" />
2946                         <field name="bib" reporter:datatype="link" />
2947                         <field name="authority" reporter:datatype="link" />
2948                 </fields>
2949                 <links>
2950                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2951                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2952                 </links>
2953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2954                         <actions>
2955                                 <retrieve/>
2956                         </actions>
2957                 </permacrud>
2958         </class>
2959         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2960                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2961                         <field name="id" reporter:datatype="id" />
2962                         <field name="record" reporter:datatype="link" />
2963                         <field name="atag" reporter:datatype="link" />
2964                         <field name="value" reporter:datatype="text" />
2965                         <field name="thesaurus" reporter:datatype="text" />
2966                 </fields>
2967                 <links>
2968                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2969                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2970                 </links>
2971         </class>
2972
2973         <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">
2974                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2975                         <field name="id" reporter:datatype="id" reporter:selector="label" />
2976                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2977                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2978                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2979                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2980                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2981                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2982                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2983                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2984                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2985                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2986                 </fields>
2987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2988                         <actions>
2989                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2990                                 <retrieve/>
2991                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2992                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2993                         </actions>
2994                 </permacrud>
2995         </class>
2996
2997         <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">
2998                 <fields oils_persist:primary="code" oils_persist:sequence="">
2999                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3000                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3001                 </fields>
3002                 <links/>
3003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3004             <actions>
3005                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3006                 <retrieve/>
3007                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3008                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3009             </actions>
3010         </permacrud>
3011         </class>
3012         <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">
3013                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3014                         <field name="accepting_usr" />
3015                         <field name="amount" reporter:datatype="money" />
3016                         <field name="amount_collected" reporter:datatype="money" />
3017                         <field name="approval_code" reporter:datatype="text"/>
3018                         <field name="cash_drawer" reporter:datatype="link"/>
3019                         <field name="cc_number" reporter:datatype="text"/>
3020                         <field name="cc_order_number" reporter:datatype="text"/>
3021                         <field name="cc_processor" reporter:datatype="text"/>
3022                         <field name="id" reporter:datatype="id" />
3023                         <field name="note" reporter:datatype="text"/>
3024                         <field name="payment_ts" reporter:datatype="timestamp"/>
3025                         <field name="xact" reporter:datatype="link"/>
3026                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3027                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3028                 </fields>
3029                 <links>
3030                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3031                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3032                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3033                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3034                 </links>
3035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3036             <actions>
3037                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3038                     <context link="xact" jump="usr" field="home_ou"/>
3039                 </retrieve>
3040                         </actions>
3041                 </permacrud>
3042         </class>
3043         <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">
3044                 <fields oils_persist:primary="name">
3045                         <field reporter:label="Name" name="name" reporter:datatype="text" />
3046                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
3047                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
3048                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
3049                 </fields>
3050                 <links/>
3051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3052             <actions>
3053                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
3054                 <retrieve/>
3055                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
3056                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
3057             </actions>
3058         </permacrud>
3059         </class>
3060
3061         <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">
3062                 <fields oils_persist:primary="alias">
3063                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
3064                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
3065                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
3066                 </fields>
3067                 <links>
3068                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3069                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3070                 </links>
3071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3072             <actions>
3073                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
3074                 <retrieve/>
3075                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
3076                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
3077             </actions>
3078         </permacrud>
3079         </class>
3080
3081         <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">
3082                 <fields oils_persist:primary="name">
3083                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
3084                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3085                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
3086                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3087                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
3088                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
3089                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
3090                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
3091                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
3092                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
3093                 </fields>
3094                 <links>
3095                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
3096                 </links>
3097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3098             <actions>
3099                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
3100                 <retrieve/>
3101                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
3102                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
3103             </actions>
3104         </permacrud>
3105         </class>
3106
3107         <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">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
3109                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
3110                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
3111                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3112                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3113                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
3114                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
3115                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
3116                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
3117                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
3118                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
3119                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
3120                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
3121                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
3122                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
3123                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
3124                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
3125                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
3126                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3127                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
3128                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
3129                 </fields>
3130                 <links>
3131                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
3132                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3133                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
3134                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
3135                 </links>
3136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3137             <actions>
3138                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3139                 <retrieve/>
3140                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3141                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3142             </actions>
3143         </permacrud>
3144         </class>
3145
3146         <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">
3147                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
3148                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3149                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
3150                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
3151                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
3152                 </fields>
3153                 <links>
3154                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
3155                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
3156                 </links>
3157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3158             <actions>
3159                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3160                 <retrieve/>
3161                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3162                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3163             </actions>
3164         </permacrud>
3165         </class>
3166
3167         <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">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
3169                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
3170                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3171                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
3172                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
3173                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
3174                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
3175                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
3176                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
3177                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
3178                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
3179                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
3180                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
3181                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
3182                 </fields>
3183                 <links>
3184                 </links>
3185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3186                         <actions>
3187                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3188                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3189                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3190                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3191                         </actions>
3192                 </permacrud>
3193         </class>
3194         <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">
3195                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3196                         <field name="id" reporter:datatype="id" />
3197                         <field name="name" reporter:datatype="text"/>
3198                         <field name="xpath" reporter:datatype="text"/>
3199                         <field name="format" reporter:datatype="link"/>
3200                         <field name="first_word" reporter:datatype="bool" />
3201                 </fields>
3202                 <links/>
3203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3204             <actions>
3205                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3206                 <retrieve/>
3207                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3208                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3209             </actions>
3210         </permacrud>
3211         </class>
3212         <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">
3213                 <fields oils_persist:primary="code" oils_persist:sequence="">
3214                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3215                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3216                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3217                 </fields>
3218                 <links/>
3219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3220             <actions>
3221                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3222                 <retrieve/>
3223                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3224                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3225             </actions>
3226         </permacrud>
3227         </class>
3228         <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">
3229                 <fields oils_persist:primary="code" oils_persist:sequence="">
3230                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3231                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3232                 </fields>
3233                 <links/>
3234         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3235             <actions>
3236                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3237                 <retrieve/>
3238                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3239                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3240             </actions>
3241         </permacrud>
3242         </class>
3243     <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">
3244         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_id_seq">
3245             <field reporter:label="ID" name="id" reporter:datatype="id" />
3246             <field reporter:label="Course Name" name="name" reporter:datatype="text" oils_obj:required="true" />
3247             <field reporter:label="Course Number" name="course_number" reporter:datatype="text" oils_obj:required="true" />
3248             <field reporter:label="Section Number" name="section_number" reporter:datatype="text" />
3249             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3250             <field reporter:label="Course Members" name="members" oils_persist:virtual="true" reporter:datatype="link" />
3251             <field reporter:label="Course Materials" name="materials" oils_persist:virtual="true" reporter:datatype="link" />
3252             <field reporter:label="Is Archived?" name="is_archived" reporter:datatype="bool" />
3253                         <field reporter:label="Terms Taught" name="terms_map" oils_persist:virtual="true" reporter:datatype="link" config_field="true" />
3254         </fields>
3255         <links>
3256             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3257             <link field="members" reltype="has_many" key="course" map="" class="acmcu" />
3258             <link field="materials" reltype="has_many" key="course" map="" class="acmcm" />
3259                         <link field="terms_map" reltype="has_many" key="course" map="" class="acmtcm" />
3260         </links>
3261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3262             <actions>
3263                 <create permission="MANAGE_RESERVES" context_field="owning_lib"/>
3264                 <retrieve/>
3265                 <update permission="MANAGE_RESERVES" context_field="owning_lib"/>
3266                 <delete permission="MANAGE_RESERVES" context_field="owning_lib"/>
3267             </actions>
3268         </permacrud>
3269     </class>
3270     <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">
3271         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_users_id_seq">
3272             <field reporter:label="ID" name="id" reporter:datatype="id" />
3273             <field reporter:label="Course" name="course" reporter:datatype="link" />
3274             <field reporter:label="User" name="usr" reporter:datatype="link" />
3275             <field reporter:label="User Role" name="usr_role" reporter:datatype="link" />
3276         </fields>
3277         <links>
3278             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3279             <link field="usr" reltype="has_a" key="id" map="" class="au" />
3280             <link field="usr_role" reltype="has_a" key="id" map="" class="acmr" />
3281         </links>
3282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3283             <actions>
3284                 <create permission="MANAGE_RESERVES">
3285                                         <context link="course" field="owning_lib" />
3286                 </create>
3287                 <retrieve/>
3288                 <update permission="MANAGE_RESERVES">
3289                                         <context link="course" field="owning_lib" />
3290                 </update>
3291                 <delete permission="MANAGE_RESERVES">
3292                                         <context link="course" field="owning_lib" />
3293                 </delete>
3294             </actions>
3295         </permacrud>
3296     </class>
3297     <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">
3298         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_materials_id_seq">
3299             <field reporter:label="ID" name="id" reporter:datatype="id" />
3300             <field reporter:label="Course" name="course" reporter:datatype="link" />
3301             <field reporter:label="Item" name="item" reporter:datatype="link" />
3302             <field reporter:label="Record" name="record" reporter:datatype="link" />
3303             <field reporter:label="Record is temporary?" name="temporary_record" reporter:datatype="bool" />
3304             <field reporter:label="Item Relationship" name="relationship" reporter:datatype="text" />
3305             <field reporter:label="Original Status" name="original_status" reporter:datatype="link" />
3306             <field reporter:label="Original Circ Modifier" name="original_circ_modifier" reporter:datatype="link" />
3307             <field reporter:label="Original Shelving Location" name="original_location" reporter:datatype="link" />
3308             <field reporter:label="Original Callnumber" name="original_callnumber" reporter:datatype="link" />
3309         </fields>
3310         <links>
3311             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3312             <link field="item" reltype="has_a" key="id" map="" class="acp" />
3313             <link field="record" reltype="has_a" key="id" map="" class="bre" />
3314             <link field="original_callnumber" reltype="has_a" key="id" map="" class="acn" />
3315             <link field="original_status" reltype="has_a" key="id" map="" class="ccs" />
3316             <link field="original_circ_modifier" reltype="has_a" key="code" map="" class="ccm" />
3317             <link field="original_location" reltype="has_a" key="id" map="" class="acpl" />
3318         </links>
3319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3320             <actions>
3321                 <create permission="MANAGE_RESERVES">
3322                                         <context link="course" field="owning_lib" />
3323                 </create>
3324                 <retrieve/>
3325                 <update permission="MANAGE_RESERVES">
3326                                         <context link="course" field="owning_lib" />
3327                 </update>
3328                 <delete permission="MANAGE_RESERVES">
3329                                         <context link="course" field="owning_lib" />
3330                 </delete>
3331             </actions>
3332         </permacrud>
3333     </class>
3334         <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">
3335                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_id_seq">
3336                         <field reporter:label="Term ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3337                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3338             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3339                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3340                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3341                         <field reporter:label="Courses" name="courses" reporter:datatype="link" oils_persist:virtual="true"/>
3342                         <field reporter:label="Course Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
3343                 </fields>
3344                 <links>
3345             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3346                         <link field="courses" reltype="has_many" key="term" map="course" class="acmtcm"/>
3347                         <link field="maps" reltype="has_many" key="term" map="" class="acmtcm"/>
3348                 </links>
3349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3350                         <actions>
3351                                 <create permission="MANAGE_RESERVES" context_field="owning_lib" />
3352                                 <retrieve/>
3353                                 <update permission="MANAGE_RESERVES" context_field="owning_lib" />
3354                                 <delete permission="MANAGE_RESERVES" context_field="owning_lib" />
3355                         </actions>
3356                 </permacrud>
3357         </class>
3358     <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">
3359         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_course_map_id_seq">
3360             <field reporter:label="Course Term Map ID" name="id" reporter:datatype="id"/>
3361             <field reporter:label="Term" name="term" oils_obj:required="true" reporter:datatype="link"/>
3362             <field reporter:label="Course" name="course" reporter:datatype="link" oils_obj:required="true"/>
3363         </fields>
3364         <links>
3365             <link field="term" reltype="has_a" key="id" map="" class="acmt"/>
3366             <link field="course" reltype="has_a" key="id" map="" class="acmc"/>
3367         </links>
3368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3369             <actions>
3370                 <create permission="MANAGE_RESERVES">
3371                                         <context link="course" field="owning_lib" />
3372                 </create>
3373                 <retrieve/>
3374                 <update permission="MANAGE_RESERVES">
3375                                         <context link="course" field="owning_lib" />
3376                 </update>
3377                 <delete permission="MANAGE_RESERVES">
3378                                         <context link="course" field="owning_lib" />
3379                 </delete>
3380             </actions>
3381         </permacrud>
3382     </class>
3383         <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">
3384                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_role_id_seq">
3385                         <field reporter:label="Role ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3386                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3387             <field reporter:label="OPAC Viewable?" name="is_public" reporter:datatype="bool" />
3388                 </fields>
3389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3390                         <actions>
3391                                 <create permission="MANAGE_RESERVES" global_required="true" />
3392                                 <retrieve/>
3393                                 <update permission="MANAGE_RESERVES" global_required="true" />
3394                                 <delete permission="MANAGE_RESERVES" global_required="true" />
3395                         </actions>
3396                 </permacrud>
3397         </class>
3398         
3399     <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">
3400         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3401             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3402             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3403             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3404             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3405         </fields>
3406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3407             <actions>
3408                 <retrieve/>
3409             </actions>
3410         </permacrud>
3411     </class>
3412         <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">
3413                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3414                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3415                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3416                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3417                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3418                 </fields>
3419                 <links>
3420                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3421                 </links>
3422         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3423             <actions>
3424                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3425                 <retrieve/>
3426                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3427                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3428             </actions>
3429         </permacrud>
3430         </class>
3431         <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">
3432                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3433                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3434                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3435                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3436                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3437                 </fields>
3438                 <links>
3439                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3440                 </links>
3441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3442             <actions>
3443                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3444                 <retrieve/>
3445                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3446                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3447             </actions>
3448         </permacrud>
3449         </class>
3450         <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">
3451                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3452                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3453                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3454                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3455                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3456                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3457                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3458                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3459                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3460                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3461                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3462                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3463                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3464                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3465                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3466                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3467                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3468                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3469                         <field reporter:label="Dewey Classification" name="dewey" oils_persist:virtual="true" reporter:datatype="link"/>
3470                 </fields>
3471                 <links>
3472                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3473                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3474                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3475                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3476                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3477                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3478                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3479                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3480                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3481                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3482                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3483                         <link field="dewey" reltype="might_have" key="call_number" map="" class="racnd"/>
3484                 </links>
3485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486             <actions>
3487                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3488                 <retrieve/>
3489                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3490                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3491             </actions>
3492         </permacrud>
3493         </class>
3494         <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">
3495                 <fields oils_persist:primary="call_number">
3496                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link" />
3497                         <field reporter:label="Dewey Number" name="dewey" reporter:datatype="text"/>
3498                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
3499                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
3500                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
3501                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
3502                 </fields>
3503                 <links>
3504                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3505                 </links>
3506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3507             <actions>
3508                 <retrieve/>
3509             </actions>
3510         </permacrud>
3511         </class>
3512         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3513                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3514                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3515                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3516                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3517                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3518                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3519                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3520                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3521                 </fields>
3522                 <links>
3523                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3524                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3525         </links>
3526         </class>
3527         <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">
3528                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3529                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3530                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3531                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3532                 </fields>
3533                 <links>
3534                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3535                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3536                 </links>
3537         </class>
3538         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3539                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3540                         <field name="id" reporter:datatype="id" />
3541                         <field name="value" oils_persist:i18n="true" />
3542                 </fields>
3543                 <links/>
3544         </class>
3545         <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">
3546                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3547                         <field name="balance_owed" reporter:datatype="money" />
3548                         <field name="total_owed" reporter:datatype="money" />
3549                         <field name="total_paid" reporter:datatype="money" />
3550                         <field name="usr" reporter:datatype="link"/>
3551                 </fields>
3552                 <links>
3553                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3554         </links>
3555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3556             <actions>
3557                 <retrieve permission="VIEW_USER">
3558                     <context link="usr" field="home_ou"/>
3559                 </retrieve>
3560             </actions>
3561         </permacrud>
3562         </class>
3563         <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">
3564                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3565                         <field name="balance_owed" reporter:datatype="money" />
3566                         <field name="total_owed" reporter:datatype="money" />
3567                         <field name="total_paid" reporter:datatype="money" />
3568                         <field name="usr" reporter:datatype="link"/>
3569                 </fields>
3570                 <links>
3571                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3572         </links>
3573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3574             <actions>
3575                 <retrieve permission="VIEW_USER">
3576                     <context link="usr" field="home_ou"/>
3577                 </retrieve>
3578             </actions>
3579         </permacrud>
3580         </class>
3581         <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">
3582                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3583                         <field name="collector" />
3584                         <field name="enter_time" reporter:datatype="timestamp"/>
3585                         <field name="id" reporter:datatype="id" />
3586                         <field name="location" reporter:datatype="link"/>
3587                         <field name="usr" reporter:datatype="link"/>
3588                 </fields>
3589                 <links>
3590                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3591                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3592                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3593                 </links>
3594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3595             <actions>
3596                 <create permission="money.collections_tracker.create" context_field="location"/>
3597                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3598                 <delete permission="money.collections_tracker.create" context_field="location"/>
3599             </actions>
3600         </permacrud>
3601         </class>
3602         <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">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3604                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3607                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3608                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3609                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3610                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3611                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3612                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3613                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3614                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3615                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3616                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3617                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3618                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3619                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3620                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3621                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3622                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3623                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3624                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3625                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3626                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3627                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3628                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3629                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3630                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3641                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3642                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3643                 </fields>
3644                 <links>
3645                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3646                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3647                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3648                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3649                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3650                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3651                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3652                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3653                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3654                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3655                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3656                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3657                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3658                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3659                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3660                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3661                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3662                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3663                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3664                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3665                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3666                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3667                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3668                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3669                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3670                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3671                 </links>
3672         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3673             <actions>
3674                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3675                 <retrieve/>
3676                 <update permission="UPDATE_MARC" global_required="true"/>
3677                 <!-- 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. -->
3678                 <delete permission="DELETE_RECORD" global_required="true"/>
3679             </actions>
3680         </permacrud>
3681         </class>
3682         <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">
3683                 <fields oils_persist:primary="id">
3684                         <field name="dow_0_close" />
3685                         <field name="dow_0_open" />
3686                         <field name="dow_1_close" />
3687                         <field name="dow_1_open" />
3688                         <field name="dow_2_close" />
3689                         <field name="dow_2_open" />
3690                         <field name="dow_3_close" />
3691                         <field name="dow_3_open" />
3692                         <field name="dow_4_close" />
3693                         <field name="dow_4_open" />
3694                         <field name="dow_5_close" />
3695                         <field name="dow_5_open" />
3696                         <field name="dow_6_close" />
3697                         <field name="dow_6_open" />
3698                         <field name="id" reporter:datatype="id" />
3699                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3700                 </fields>
3701                 <links>
3702                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3703                 </links>
3704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3705             <actions>
3706                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3707                 <retrieve/>
3708                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3709                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3710             </actions>
3711         </permacrud>
3712         </class>
3713         <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">
3714                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3715                         <field name="id" reporter:datatype="id" />
3716                         <field name="record" reporter:datatype="link"/>
3717                         <field name="label" reporter:datatype="text"/>
3718                         <field name="label_sortkey" reporter:datatype="text"/>
3719                         <field name="deleted" reporter:datatype="bool"/>
3720                 </fields>
3721                 <links>
3722                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3723                 </links>
3724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3725             <actions>
3726                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3727                 <retrieve/>
3728                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3729                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3730             </actions>
3731         </permacrud>
3732         </class>
3733         <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">
3734                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3735                         <field name="id" reporter:datatype="id" />
3736                         <field name="target_copy" reporter:datatype="link" />
3737                         <field name="part" reporter:datatype="link"/>
3738                 </fields>
3739                 <links>
3740                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3741                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3742                 </links>
3743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3744             <actions>
3745                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3746                 <retrieve/>
3747                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3748                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3749             </actions>
3750         </permacrud>
3751         </class>
3752     <class  id="aecc"
3753             controller="open-ils.cstore open-ils.pcrud"
3754             oils_obj:fieldmapper="action::emergency_closing_circulation"
3755             oils_persist:tablename="action.emergency_closing_circulation"
3756             reporter:label="Emergency Closing Circulation Entry"
3757             oils_persist:readonly="true"
3758     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3759         <fields oils_persist:primary="id">
3760             <field name="id" reporter:datatype="id" />
3761             <field name="circulation" reporter:datatype="link" />
3762                         <field name="emergency_closing" reporter:datatype="link"/>
3763             <field name="original_due_date" reporter:datatype="timestamp" />
3764             <field name="process_time" reporter:datatype="timestamp" />
3765         </fields>
3766         <links>
3767             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3768             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3769         </links>
3770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3771             <actions>
3772                 <retrieve/>
3773             </actions>
3774         </permacrud>
3775     </class>
3776     <class  id="aecr"
3777             controller="open-ils.cstore open-ils.pcrud"
3778             oils_obj:fieldmapper="action::emergency_closing_reservation"
3779             oils_persist:tablename="action.emergency_closing_reservation"
3780             reporter:label="Emergency Closing Reservation Entry"
3781             oils_persist:readonly="true"
3782     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3783         <fields oils_persist:primary="id">
3784             <field name="id" reporter:datatype="id" />
3785             <field name="reservation" reporter:datatype="link" />
3786                         <field name="emergency_closing" reporter:datatype="link"/>
3787             <field name="original_end_time" reporter:datatype="timestamp" />
3788             <field name="process_time" reporter:datatype="timestamp" />
3789         </fields>
3790         <links>
3791             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3792             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3793         </links>
3794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3795             <actions>
3796                 <retrieve/>
3797             </actions>
3798         </permacrud>
3799     </class>
3800     <class  id="aech"
3801             controller="open-ils.cstore open-ils.pcrud"
3802             oils_obj:fieldmapper="action::emergency_closing_hold"
3803             oils_persist:tablename="action.emergency_closing_hold"
3804             reporter:label="Emergency Closing Hold Entry"
3805             oils_persist:readonly="true"
3806     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3807         <fields oils_persist:primary="id">
3808             <field name="id" reporter:datatype="id" />
3809             <field name="hold" reporter:datatype="link" />
3810                         <field name="emergency_closing" reporter:datatype="link"/>
3811             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3812             <field name="process_time" reporter:datatype="timestamp" />
3813         </fields>
3814         <links>
3815             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3816             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3817         </links>
3818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3819             <actions>
3820                 <retrieve/>
3821             </actions>
3822         </permacrud>
3823     </class>
3824     <class  id="aecs"
3825             controller="open-ils.cstore open-ils.pcrud"
3826             oils_obj:fieldmapper="action::emergency_closing_status"
3827             oils_persist:tablename="action.emergency_closing_status"
3828             reporter:label="Emergency Closing Status"
3829             oils_persist:readonly="true"
3830     >
3831         <fields oils_persist:primary="id">
3832             <field name="id" reporter:datatype="id" />
3833             <field name="creator" reporter:datatype="link" />
3834             <field name="create_time" reporter:datatype="timestamp" />
3835             <field name="process_start_time" reporter:datatype="timestamp" />
3836             <field name="process_end_time" reporter:datatype="timestamp" />
3837             <field name="last_update_time" reporter:datatype="timestamp" />
3838             <field name="circulations" reporter:datatype="int" />
3839             <field name="circulations_complete" reporter:datatype="int" />
3840             <field name="reservations" reporter:datatype="int" />
3841             <field name="reservations_complete" reporter:datatype="int" />
3842             <field name="holds" reporter:datatype="int" />
3843             <field name="holds_complete" reporter:datatype="int" />
3844         </fields>
3845         <links>
3846             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3847         </links>
3848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3849             <actions>
3850                 <retrieve/>
3851             </actions>
3852         </permacrud>
3853     </class>
3854     <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">
3855         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3856             <field name="id" reporter:datatype="id" />
3857             <field name="creator" reporter:datatype="link" />
3858             <field name="create_time" reporter:datatype="timestamp" />
3859             <field name="process_start_time" reporter:datatype="timestamp" />
3860             <field name="process_end_time" reporter:datatype="timestamp" />
3861             <field name="last_update_time" reporter:datatype="timestamp" />
3862             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3863             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3864             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3865             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3866             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3867         </fields>
3868         <links>
3869             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3870             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3871             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3872             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3873             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3874             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3875         </links>
3876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3877             <actions>
3878                 <create permission="EMERGENCY_CLOSING">
3879                     <context link="closing" field="org_unit" />
3880                 </create>
3881                 <retrieve/>
3882                 <update permission="EMERGENCY_CLOSING">
3883                     <context link="closing" field="org_unit" />
3884                 </update>
3885                 <delete permission="EMERGENCY_CLOSING">
3886                     <context link="closing" field="org_unit" />
3887                 </delete>
3888             </actions>
3889         </permacrud>
3890     </class>
3891         <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">
3892                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3893                         <field name="close_end" reporter:datatype="timestamp" />
3894                         <field name="close_start" reporter:datatype="timestamp" />
3895                         <field name="id" reporter:datatype="id" />
3896                         <field name="org_unit" reporter:datatype="org_unit"/>
3897                         <field name="reason" reporter:datatype="text"/>
3898                         <field name="full_day" reporter:datatype="bool"/>
3899                         <field name="multi_day" reporter:datatype="bool"/>
3900                         <field name="emergency_closing" reporter:datatype="link"/>
3901                 </fields>
3902                 <links>
3903                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3904                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3905                 </links>
3906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3907             <actions>
3908                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3909                 <retrieve/>
3910                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3911                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3912             </actions>
3913         </permacrud>
3914         </class>
3915         <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">
3916                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3917                         <field name="extended" reporter:datatype="interval"/>
3918                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3919                         <field name="max_renewals" reporter:datatype="int" />
3920                         <field name="name" reporter:datatype="text"/>
3921                         <field name="normal" reporter:datatype="interval"/>
3922                         <field name="shrt" reporter:datatype="interval"/>
3923                         <field name="max_auto_renewals" reporter:datatype="int" />
3924                 </fields>
3925                 <links>
3926                 </links>
3927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3928             <actions>
3929                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3930                 <retrieve/>
3931                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3932                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3933             </actions>
3934         </permacrud>
3935         </class>
3936
3937         <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">
3938                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3939                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3940                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3941             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3942                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3943             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3944                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3945                                 reporter:datatype="link" config_field="true"/>
3946                 </fields>
3947                 <links>
3948             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3949                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3950                 </links>
3951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3952             <actions>
3953                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3954                 <retrieve/>
3955                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3956                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3957             </actions>
3958                 </permacrud>
3959         </class>
3960
3961         <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">
3962                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3963                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3964                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3965                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3966             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3967                 </fields>
3968                 <links>
3969                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3970                 </links>
3971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3972             <actions>
3973                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3974                 <retrieve/>
3975                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3976                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3977             </actions>
3978                 </permacrud>
3979         </class>
3980
3981         <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">
3982                 <fields oils_persist:primary="id" oils_persist:sequence="">
3983                         <field name="balance_owed" reporter:datatype="money"/>
3984                         <field name="id" reporter:datatype="id" />
3985                         <field name="last_billing_note" reporter:datatype="text"/>
3986                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3987                         <field name="last_billing_type" reporter:datatype="text"/>
3988                         <field name="last_payment_note" reporter:datatype="text"/>
3989                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3990                         <field name="last_payment_type" reporter:datatype="text"/>
3991                         <field name="total_owed" reporter:datatype="money"/>
3992                         <field name="total_paid" reporter:datatype="money"/>
3993                         <field name="usr" reporter:datatype="link"/>
3994                         <field name="xact_finish" reporter:datatype="timestamp" />
3995                         <field name="xact_start" reporter:datatype="timestamp" />
3996                         <field name="xact_type" reporter:datatype="text"/>
3997                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3998                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3999                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4000                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
4001                         <field name="billing_location" reporter:datatype="link"/>
4002                 </fields>
4003                 <links>
4004                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4005                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
4006                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4007                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4008                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
4009                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4010                 </links>
4011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4012                         <actions>
4013                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4014                                         <context link="usr" field="home_ou" />
4015                                 </retrieve>
4016                         </actions>
4017                 </permacrud>
4018         </class>
4019         <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">
4020                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
4021                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4022                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
4023                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
4024                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4025                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
4026                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4027                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
4028                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4029                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
4030                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4031                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
4032                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
4033                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4034                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
4035                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
4036                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
4037                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
4038                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
4039                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4040                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
4041                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
4042                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
4043                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
4044                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
4045                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
4046                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
4047                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
4048                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
4049                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
4050                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
4051                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
4052                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
4053                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
4054                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4055                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4056                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
4057                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
4058                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
4059                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
4060                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
4061                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
4062                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
4063                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
4064                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
4065                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
4066                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
4067                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
4068                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
4069                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
4070                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
4071                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
4072                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
4073                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
4074                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
4075                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
4076                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
4077                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
4078                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
4079                         <field reporter:label="Name Keyword internal tsvector" name="name_kw_tsvector" reporter:datatype="text"/>
4080                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
4081                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4082                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4083                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
4084                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
4085                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4086                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4088                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4089                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4090                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
4091                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
4092                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
4093                 </fields>
4094                 <links>
4095                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
4096                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
4097                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
4098                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
4099                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
4100                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
4101                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
4102                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
4103                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
4104                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
4105                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
4106                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
4107                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
4108                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
4109                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
4110                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
4111                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
4112                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
4113                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
4114                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
4115                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
4116                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
4117                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
4118                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
4119                         <link field="notes" reltype="has_many" key="usr" map="" class="aum"/>
4120                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
4121                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
4122                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
4123                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
4124                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
4125                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
4126                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
4127                 </links>
4128                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4129                         <actions>
4130                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
4131                         </actions>
4132                 </permacrud>
4133         </class>
4134         <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">
4135                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
4136                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
4137                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
4138                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
4139                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
4140                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
4141                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
4142                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
4143                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
4144         </fields>
4145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4146                         <actions>
4147                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4148                                 <retrieve/>
4149                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4150                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4151                         </actions>
4152                 </permacrud>
4153         </class>
4154         <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">
4155                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
4156                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4157                         <field name="usr" reporter:label="User" reporter:datatype="link" />
4158                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
4159                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
4160         </fields>
4161         <links>
4162                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4163                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
4164                 </links>
4165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4166                         <actions>
4167                                 <retrieve permission="RUN_REPORTS">
4168                                         <context link="usr" field="home_ou" />
4169                                 </retrieve>
4170                         </actions>
4171                 </permacrud>
4172         </class>
4173         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
4174                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
4175                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4176                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
4177                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
4178                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
4179                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
4180                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
4181         </fields>
4182         <links>
4183                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
4184                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
4185                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
4186                 </links>
4187                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4188                         <actions>
4189                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
4190                                         <context link="usr" field="home_ou" />
4191                                         <context link="ws" field="owning_lib" />
4192                                 </retrieve>
4193                                 <create permission="ADMIN_TOOLBAR" context_field="org">
4194                                         <context link="usr" field="home_ou" />
4195                                         <context link="ws" field="owning_lib" />
4196                                 </create>
4197                                 <update permission="ADMIN_TOOLBAR" context_field="org">
4198                                         <context link="usr" field="home_ou" />
4199                                         <context link="ws" field="owning_lib" />
4200                                 </update>
4201                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
4202                                         <context link="usr" field="home_ou" />
4203                                         <context link="ws" field="owning_lib" />
4204                                 </delete>
4205                         </actions>
4206                 </permacrud>
4207         </class>
4208         <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">
4209                 <fields oils_persist:primary="name">
4210                         <field name="name" reporter:datatype="text"/>
4211                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4212                 </fields>
4213                 <links/>
4214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4215                         <actions>
4216                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4217                                 <retrieve/>
4218                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4219                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4220                         </actions>
4221                 </permacrud>
4222         </class>
4223         <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">
4224                 <fields oils_persist:primary="name">
4225                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
4226                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
4227                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
4228                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
4229                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
4230                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
4231                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
4232                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
4233                 </fields>
4234                 <links>
4235                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
4236                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4237                 </links>
4238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4239                         <actions>
4240                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4241                                 <retrieve/>
4242                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4243                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4244                         </actions>
4245                 </permacrud>
4246         </class>
4247         <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">
4248                 <fields oils_persist:primary="name">
4249                         <field name="name" reporter:datatype="text"/>
4250                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4251                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4252                         <field name="datatype" reporter:datatype="text"/>
4253                         <field name="view_perm" reporter:datatype="link"/>
4254                         <field name="update_perm" reporter:datatype="link"/>
4255                         <field name="fm_class" reporter:datatype="text"/>
4256                         <field name="grp" reporter:datatype="link"/>
4257                 </fields>
4258                 <links>
4259                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
4260                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
4261                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
4262                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4263                 </links>
4264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4265                         <actions>
4266                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4267                                 <retrieve/>
4268                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4269                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4270                         </actions>
4271                 </permacrud>
4272         </class>
4273         <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">
4274                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
4275                         <field name="id" />
4276                         <field name="name"  reporter:datatype="text"/>
4277                         <field name="org_unit" reporter:datatype="org_unit"/>
4278                         <field name="value"  reporter:datatype="text"/>
4279                 </fields>
4280                 <links>
4281                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4282                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
4283                 </links>
4284         </class>
4285         <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">
4286                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
4287                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4288                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
4289                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
4290                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
4291                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
4292                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
4293                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
4294                 </fields>
4295                 <links>
4296                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4297                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4298                 </links>
4299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4300             <actions>
4301                 <create permission="CREATE_COPY_NOTE">
4302                     <context link="owning_copy" field="circ_lib"/>
4303                 </create>
4304                 <retrieve permission="VIEW_COPY_NOTES">
4305                     <context link="owning_copy" field="circ_lib"/>
4306                 </retrieve>
4307                 <update permission="UPDATE_COPY_NOTE">
4308                     <context link="owning_copy" field="circ_lib"/>
4309                 </update>
4310                 <delete permission="DELETE_COPY_NOTE">
4311                     <context link="owning_copy" field="circ_lib"/>
4312                 </delete>
4313             </actions>
4314         </permacrud>
4315         </class>
4316         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
4317                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
4318                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
4319                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
4320                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
4321                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4322                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
4323                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
4324                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
4325                 </fields>
4326                 <links>
4327                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4328                 </links>
4329         </class>
4330         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
4331                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
4332                         <field name="fingerprint"  reporter:datatype="text"/>
4333                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
4334                         <field name="master_record" reporter:datatype="link"/>
4335                         <field name="mods"  reporter:datatype="text"/>
4336                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
4337                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4338                 </fields>
4339                 <links>
4340                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
4341                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
4342                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
4343                 </links>
4344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4345                         <actions>
4346                                 <retrieve/>
4347                         </actions>
4348                 </permacrud>
4349         </class>
4350         <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">
4351                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
4352                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4353                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4354                 </fields>
4355                 <links/>
4356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4357             <actions>
4358                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
4359                 <retrieve/>
4360                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
4361                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
4362             </actions>
4363         </permacrud>
4364         </class>
4365         <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">
4366                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
4367                         <field name="code"  reporter:datatype="text"/>
4368                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
4369                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
4370                 </fields>
4371                 <links/>
4372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4373             <actions>
4374                 <create permission="CREATE_PERM" global_required="true"/>
4375                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
4376                 <update permission="UPDATE_PERM" global_required="true"/>
4377                 <delete permission="DELETE_PERM" global_required="true"/>
4378             </actions>
4379         </permacrud>
4380         </class>
4381         <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">
4382                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
4383                         <field name="id" reporter:datatype="id" />
4384                         <field name="metarecord" reporter:datatype="link"/>
4385                         <field name="source" reporter:datatype="link"/>
4386                 </fields>
4387                 <links>
4388                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4389                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4390                 </links>
4391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4392                         <actions>
4393                                 <retrieve/>
4394                         </actions>
4395                 </permacrud>
4396         </class>
4397         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4398                         oils_obj:fieldmapper="metabib::display_entry" 
4399                         oils_persist:tablename="metabib.display_entry" 
4400                         oils_persist:field_safe="true"
4401                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4402                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4403                         <field name="id" reporter:datatype="id" />
4404                         <field name="field" reporter:datatype="link"/>
4405                         <field name="source" reporter:datatype="link"/>
4406                         <field name="value"  reporter:datatype="text"/>
4407                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4408                 </fields>
4409                 <links>
4410                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4411                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4412                 </links>
4413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4414                         <actions>
4415                                 <retrieve/>
4416                         </actions>
4417                 </permacrud>
4418         </class>
4419         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4420                 oils_persist:tablename="metabib.flat_display_entry"
4421                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4422                 oils_persist:field_safe="true"
4423                 reporter:label="Flat Display Entry" 
4424                 oils_persist:readonly="true">
4425                 <fields>
4426                         <field name="source" reporter:datatype="id" />
4427                         <field name="name" reporter:datatype="text"/>
4428                         <field name="multi" reporter:datatype="bool"/>
4429                         <field name="label" reporter:datatype="text"/>
4430                         <field name="field" reporter:datatype="link"/>
4431                         <field name="value" reporter:datatype="text"/>
4432                 </fields>
4433                 <links>
4434                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4435                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4436                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4437                 </links>
4438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4439                         <actions>
4440                                 <retrieve/>
4441                         </actions>
4442                 </permacrud>
4443         </class>
4444         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4445                 oils_persist:tablename="metabib.compressed_display_entry"
4446                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4447                 oils_persist:field_safe="true"
4448                 reporter:label="Compressed Display Entry" 
4449                 oils_persist:readonly="true">
4450                 <fields>
4451                         <field name="source" reporter:datatype="id" />
4452                         <field name="name" reporter:datatype="text"/>
4453                         <field name="multi" reporter:datatype="bool"/>
4454                         <field name="label" reporter:datatype="text"/>
4455                         <field name="field" reporter:datatype="link"/>
4456                         <field name="value" reporter:datatype="text"/>
4457                 </fields>
4458                 <links>
4459                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4460                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4461                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4462                 </links>
4463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4464                         <actions>
4465                                 <retrieve/>
4466                         </actions>
4467                 </permacrud>
4468         </class>
4469         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4470                 oils_persist:tablename="metabib.wide_display_entry"
4471                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4472                 oils_persist:field_safe="true"
4473                 reporter:label="Wide Display Entry" 
4474                 oils_persist:readonly="true">
4475                 <fields oils_persist:primary="source">
4476                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4477                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4478                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4479                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4480                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4481                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4482                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4483                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4484                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4485                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4486                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4487                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4488                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4489                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4490                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4491                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4492                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4493                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4494                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4495                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4496                 </fields>
4497                 <links>
4498                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4499                 </links>
4500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4501                         <actions>
4502                                 <retrieve/>
4503                         </actions>
4504                 </permacrud>
4505         </class>
4506
4507         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4508                 oils_persist:tablename="config.display_field_map"
4509                 oils_obj:fieldmapper="config::display_field_map"
4510                 oils_persist:field_safe="true"
4511                 reporter:label="Display Field Map">
4512                 <fields oils_persist:primary="name">
4513                         <field name="name" reporter:datatype="text"/>
4514                         <field name="field" reporter:datatype="link"/>
4515                         <field name="multi" reporter:datatype="bool"/>
4516                 </fields>
4517                 <links>
4518                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4519                 </links>
4520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4521                         <actions>
4522                                 <retrieve/>
4523                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4524                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4525                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4526                         </actions>
4527                 </permacrud>
4528         </class>
4529
4530         <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">
4531                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4532                         <field name="id" reporter:datatype="id" />
4533                         <field name="field" reporter:datatype="link"/>
4534                         <field name="source" reporter:datatype="link"/>
4535                         <field name="value"  reporter:datatype="text"/>
4536                 </fields>
4537                 <links>
4538                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4539                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4540                 </links>
4541         </class>
4542         <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">
4543                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4544                         <field name="id" reporter:datatype="id" />
4545                         <field name="value" reporter:datatype="text"/>
4546                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4547                 </fields>
4548                 <links>
4549                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4550                 </links>
4551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4552                         <actions>
4553                                 <retrieve/>
4554                         </actions>
4555                 </permacrud>
4556         </class>
4557         <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">
4558                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4559                         <field name="id" reporter:datatype="id" />
4560                         <field name="entry" reporter:datatype="link"/>
4561                         <field name="def" reporter:datatype="link"/>
4562                         <field name="source" reporter:datatype="link"/>
4563                 </fields>
4564                 <links>
4565                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4566                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4567                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4568                 </links>
4569         </class>
4570         <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">
4571                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4572                         <field name="id" reporter:datatype="id" />
4573                         <field name="entry" reporter:datatype="link"/>
4574                         <field name="simple_heading" reporter:datatype="link"/>
4575                 </fields>
4576                 <links>
4577                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4578                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4579                 </links>
4580         </class>
4581         <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">
4582                 <oils_persist:source_definition><![CDATA[
4583                         SELECT * FROM metabib.author_field_entry
4584                                                 UNION ALL
4585                         SELECT * FROM metabib.keyword_field_entry
4586                                                 UNION ALL
4587                         SELECT * FROM metabib.identifier_field_entry
4588                                                 UNION ALL
4589                         SELECT * FROM metabib.title_field_entry
4590                                                 UNION ALL
4591                         SELECT * FROM metabib.subject_field_entry
4592                                                 UNION ALL
4593                         SELECT * FROM metabib.series_field_entry
4594                 ]]></oils_persist:source_definition>
4595                 <fields>
4596                         <field name="field" reporter:datatype="link"/>
4597                         <field name="id" reporter:datatype="id" />
4598                         <field name="source" reporter:datatype="link"/>
4599                         <field name="value"  reporter:datatype="text"/>
4600                 </fields>
4601                 <links>
4602                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4603                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4604                 </links>
4605         </class>
4606         <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">
4607                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4608                         <field name="field" reporter:datatype="link"/>
4609                         <field name="id" reporter:datatype="id" />
4610                         <field name="source" reporter:datatype="link"/>
4611                         <field name="value"  reporter:datatype="text"/>
4612                 </fields>
4613                 <links>
4614                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4615                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4616                 </links>
4617         </class>
4618         <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">
4619                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4620                         <field name="accepting_usr" reporter:datatype="link"/>
4621                         <field name="amount" reporter:datatype="money" />
4622                         <field name="amount_collected" reporter:datatype="money" />
4623                         <field name="cash_drawer" reporter:datatype="link"/>
4624                         <field name="id" reporter:datatype="id" />
4625                         <field name="note"  reporter:datatype="text"/>
4626                         <field name="payment_ts" reporter:datatype="timestamp"/>
4627                         <field name="xact" reporter:datatype="link"/>
4628                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4629                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4630                 </fields>
4631                 <links>
4632                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4633                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4634                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4635                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4636                 </links>
4637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4638             <actions>
4639                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4640                     <context link="xact" jump="usr" field="home_ou"/>
4641                 </retrieve>
4642                         </actions>
4643                 </permacrud>
4644         </class>
4645         <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">
4646                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4647                         <field name="accepting_usr" reporter:datatype="link"/>
4648                         <field name="amount" reporter:datatype="money" />
4649                         <field name="amount_collected" reporter:datatype="money" />
4650                         <field name="id" reporter:datatype="id" />
4651                         <field name="note"  reporter:datatype="text"/>
4652                         <field name="payment_ts" reporter:datatype="timestamp"/>
4653                         <field name="xact" reporter:datatype="link"/>
4654                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4655                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4656                 </fields>
4657                 <links>
4658                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4659                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4660                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4661                 </links>
4662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4663             <actions>
4664                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4665                     <context link="xact" jump="usr" field="home_ou"/>
4666                 </retrieve>
4667                         </actions>
4668                 </permacrud>
4669         </class>
4670         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4671                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4672                         <field name="accepting_usr" reporter:datatype="link"/>
4673                         <field name="amount" reporter:datatype="money" />
4674                         <field name="amount_collected" reporter:datatype="money" />
4675                         <field name="id" reporter:datatype="id" />
4676                         <field name="note"  reporter:datatype="text"/>
4677                         <field name="payment_ts" reporter:datatype="timestamp"/>
4678                         <field name="xact" reporter:datatype="link"/>
4679                         <field name="billing" reporter:datatype="link"/>
4680                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4681                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4682                 </fields>
4683                 <links>
4684                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4685                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4686                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4687                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4688                 </links>
4689         </class>
4690         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4691                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4692                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4693                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4694                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4695                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4696                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4697                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4698                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4699                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4700                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4701                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4702                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4703                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4704                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4705                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4706                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4707                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4708                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4709                 </fields>
4710                 <links>
4711                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4712                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4713                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4714                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4715                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4716                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4717                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4718                 </links>
4719         </class>
4720
4721         <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">
4722                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4723                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4724                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4725                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4726                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4727                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4728                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4729                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4730                 </fields>
4731                 <links/>
4732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4733             <actions>
4734                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4735                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4736                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4737                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4738             </actions>
4739         </permacrud>
4740         </class>
4741         <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">
4742                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4743                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4744                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4745                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4746                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4747                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4748                 </fields>
4749                 <links>
4750                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4751                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4752                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4753         </links>
4754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4755             <actions>
4756                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4757                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4758                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4759                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4760             </actions>
4761         </permacrud>
4762         </class>
4763         <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">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4765                         <field name="holdable" reporter:datatype="bool" reporter:label="Holdable"/>
4766                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4767                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
4768                         <field name="opac_visible" reporter:datatype="bool" reporter:label="OPAC Visible"/>
4769             <field name="copy_active" reporter:datatype="bool" reporter:label="Sets Item Active"/>
4770             <field name="restrict_copy_delete" reporter:datatype="bool" reporter:label="Restrict Deletion"/>
4771             <field name="is_available" reporter:datatype="bool" reporter:label="Available"/>
4772             <field name="hopeless_prone" reporter:datatype="bool" reporter:label="Prone to Hopeless Holds?"/>
4773                 </fields>
4774                 <links/>
4775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4776             <actions>
4777                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4778                 <retrieve/>
4779                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4780                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4781             </actions>
4782         </permacrud>
4783         </class>
4784         <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">
4785                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
4786                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4787                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4788                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4789                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4790                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4791                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4792                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4793                         <field name="usr_message" reporter:datatype="link" reporter:label="User Message"/>
4794                 </fields>
4795                 <links>
4796                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4797                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4798                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4799                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4800                         <link field="usr_message" reltype="has_a" key="id" map="" class="aum"/>
4801                 </links>
4802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4803                         <actions>
4804                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4805                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4806                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4807                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4808                         </actions>
4809                 </permacrud>
4810         </class>
4811         <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">
4812                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4813                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4814                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4815                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4816                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4817                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4818                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4819                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4820                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4821                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4822                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4823                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4824                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4825                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4826                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4827                 </fields>
4828                 <links>
4829                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4830                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4831                 </links>
4832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4833                         <actions>
4834                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4835                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4836                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4837                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4838                         </actions>
4839                 </permacrud>
4840         </class>
4841         <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">
4842                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4843                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4844                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4845                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4846                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4847                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4848                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4849                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4850                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4851                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4852                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4853                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4854                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4855                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4856                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4857                 </fields>
4858                 <links>
4859                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4860                 </links>
4861                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4862                         <actions>
4863                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4864                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4865                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4866                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4867                         </actions>
4868                 </permacrud>
4869         </class>
4870
4871
4872         <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">
4873                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4874                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4875                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4876                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4877                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4878                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4879                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4880                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4881                 </fields>
4882                 <links>
4883                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4884                 </links>
4885         </class>
4886
4887         <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">
4888                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4889                         <field name="call_number" />
4890                         <field name="create_date" reporter:datatype="timestamp"/>
4891                         <field name="creator" reporter:datatype="link"/>
4892                         <field name="id" reporter:datatype="id" />
4893                         <field name="pub" reporter:datatype="bool"/>
4894                         <field name="title"  reporter:datatype="text"/>
4895                         <field name="value"  reporter:datatype="text"/>
4896                 </fields>
4897                 <links>
4898                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4899                 </links>
4900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4901             <actions>
4902                 <create permission="CREATE_VOLUME_NOTE">
4903                     <context link="call_number" field="owning_lib"/>
4904                 </create>
4905                 <retrieve permission="VIEW_VOLUME_NOTES">
4906                     <context link="call_number" field="owning_lib"/>
4907                 </retrieve>
4908                 <update permission="UPDATE_VOLUME_NOTE">
4909                     <context link="call_number" field="owning_lib"/>
4910                 </update>
4911                 <delete permission="DELETE_VOLUME_NOTE">
4912                     <context link="call_number" field="owning_lib"/>
4913                 </delete>
4914             </actions>
4915         </permacrud>
4916         </class>
4917         <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">
4918                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4919                         <field name="create_date" reporter:datatype="timestamp"/>
4920                         <field name="creator" reporter:datatype="link"/>
4921                         <field name="edit_date" reporter:datatype="timestamp"/>
4922                         <field name="editor" reporter:datatype="link"/>
4923                         <field name="id" reporter:datatype="id" />
4924                         <field name="record" reporter:datatype="link"/>
4925                         <field name="value" reporter:datatype="text"/>
4926                 </fields>
4927                 <links>
4928                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4929                 </links>
4930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4931             <actions>
4932                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4933                 <retrieve/>
4934                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4935                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4936             </actions>
4937         </permacrud>
4938         </class>
4939         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4940         <oils_persist:source_definition><![CDATA[
4941 SELECT  usr,
4942         SUM(
4943             CASE
4944                 WHEN (
4945                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4946                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4947                 ) THEN 1
4948                 ELSE 0
4949             END
4950         ) AS out,
4951
4952         SUM(
4953             CASE
4954                 WHEN (
4955                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4956                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4957                 ) THEN 1
4958                 ELSE 0
4959             END
4960         ) AS overdue,
4961
4962         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4963         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4964         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4965   FROM  action.circulation
4966   WHERE checkin_time IS NULL
4967   GROUP BY 1
4968         ]]></oils_persist:source_definition>
4969         <fields oils_persist:primary="usr">
4970             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4971             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4972             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4973             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4974             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4975             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4976         </fields>
4977         <links>
4978             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4979         </links>
4980         </class>
4981         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4982         <oils_persist:source_definition><![CDATA[
4983 SELECT  usr,
4984         STRING_AGG(
4985             CASE
4986                 WHEN (
4987                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4988                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4989                 ) THEN id::TEXT
4990                 ELSE '0'
4991             END
4992         ,',') AS out,
4993
4994         STRING_AGG(
4995             CASE
4996                 WHEN (
4997                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4998                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4999                 ) THEN id::TEXT
5000                 ELSE '0'
5001             END
5002         ,',') AS overdue,
5003
5004         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
5005         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
5006         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
5007   FROM  action.circulation
5008   WHERE checkin_time IS NULL
5009   GROUP BY 1
5010         ]]></oils_persist:source_definition>
5011         <fields oils_persist:primary="usr">
5012             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
5013             <field reporter:label="Out" name="out" reporter:datatype="text"/>
5014             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
5015             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
5016             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
5017             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
5018         </fields>
5019         <links>
5020             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5021         </links>
5022         </class>
5023         <class id="acsp" controller="open-ils.cstore" oils_obj:fieldmapper="action::curbside" oils_persist:tablename="action.curbside" reporter:label="Curbside Appointment Slot">
5024                 <fields oils_persist:primary="id" oils_persist:sequence="action.curbside_id_seq">
5025                         <field reporter:label="Appointment ID" name="id" reporter:datatype="id" />
5026                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5027                         <field reporter:label="Pickup Library" name="org" reporter:datatype="org_unit"/>
5028                         <field reporter:label="Appointment Date/Time" name="slot" reporter:datatype="timestamp"/>
5029                         <field reporter:label="Staged" name="staged" reporter:datatype="timestamp"/>
5030                         <field reporter:label="Staging Staff" name="stage_staff" reporter:datatype="link"/>
5031                         <field reporter:label="Arrival Date/Time" name="arrival" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Delivery Date/Time" name="delivered" reporter:datatype="timestamp"/>
5033                         <field reporter:label="Delivery Staff" name="delivery_staff" reporter:datatype="link"/>
5034                         <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
5035                 </fields>
5036                 <links>
5037                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5038                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5039                         <link field="stage_staff" reltype="has_a" key="id" map="" class="au"/>
5040                         <link field="delivery_staff" reltype="has_a" key="id" map="" class="au"/>
5041                 </links>
5042         </class>
5043         <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">
5044                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5045                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5046                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5047                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5048                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
5049                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5050                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5051                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5052                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5053                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5054                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5055                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5056                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5057                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5058                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5059                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5060                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5061                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5062                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5063                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5064                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5065                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5066                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5067                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5068                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5069                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5070                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5071                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5072                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5073                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5074                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5075                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5076                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5077                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5078                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5079                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5080                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5081                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5082                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5083                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5084                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5085                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5086                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5087                 </fields>
5088                 <links>
5089                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5090                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5091                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5092                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5093                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5094                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5095                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5096                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5097                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5098                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5099                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5100                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5101                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5102                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5103                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5104                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5105                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5106                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
5107                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5108                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5109                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5110                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5111                 </links>
5112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5113                         <actions>
5114                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5115                         </actions>
5116                 </permacrud>
5117         </class>
5118         <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">
5119                 <fields>
5120                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5121                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5122                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
5123                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5124                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
5125                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5126                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
5127                 </fields>
5128                 <links>
5129                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5130                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5131                 </links>
5132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5133                         <actions>
5134                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5135                         </actions>
5136                 </permacrud>
5137         </class>
5138         <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">
5139                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5140                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5141                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5142                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5144                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5145                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5146                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5147                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5148                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5149                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5150                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5151                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5152                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5153                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5154                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5155                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5156                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5157                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5158                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5159                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5160                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5161                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5162                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5163                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5164                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5165                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5166                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5168                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5169                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5172                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5173                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5174                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5175                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5176                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5177                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5178                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5179                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5180                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5181                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5182                 </fields>
5183                 <links>
5184                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5185                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5186                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5187                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5188                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5189                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5190                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5191                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5192                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5193                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5194                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5195                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5196                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5197                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5198                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5199                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5200                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5201                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5202                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5203                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5204                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5205                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5206                 </links>
5207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5208                         <actions>
5209                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5210                         </actions>
5211                 </permacrud>
5212         </class>
5213
5214         <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">
5215                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5216                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5217                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5218                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5219                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5220                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5221                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5222                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5223                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5224                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5225                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5226                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5227                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5228                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5229                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5230                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5231                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5232                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5233                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5234                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5235                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5236                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5237                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5238                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5239                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5240                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5241                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5242                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5243                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5244                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5245                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5246                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5247                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5248                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5249                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5250                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5251                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5252                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5253                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5254                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5255                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5256                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5257                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5258                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5259                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5260                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5261                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5262                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5263                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5264                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5266                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5267                 </fields>
5268                 <links>
5269                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5270                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5271                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5272                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5273                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5274                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5275                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5276                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5277                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5278                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5279                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5280                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5281                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5282                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5283                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5284                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5285                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5286                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5287                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5288                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5289                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5290                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5291                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5292                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5293                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5294                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5295                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5296                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5297                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5298                 </links>
5299                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5300                         <actions>
5301                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5302                         </actions>
5303                 </permacrud>
5304         </class>
5305         <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">
5306                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5307                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5308                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5309                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5310                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5311                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5312                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5313                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5314                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5315                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5316                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5317                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5318                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5319                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5320                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5321                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5322                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5323                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5324                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5325                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5326                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5327                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5328                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5329                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5330                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5331                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5332                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5333                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5334                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5335                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5336                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5337                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5338                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5339                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5340                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5341                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5342                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5343                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5344                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5345                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5346                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5347                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5348                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5349                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5350                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5351                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5352                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5353                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5354                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5355                 </fields>
5356                 <links>
5357                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5358                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5359                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5360                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5361                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5362                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5363                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5364                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5365                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5366                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5367                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5368                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5369                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5370                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5371                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5372                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5373                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5374                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5375                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5376                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5377                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5378                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
5379                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5380                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5381                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5382                 </links>
5383         </class>
5384         <class id="auch" 
5385                 controller="open-ils.cstore" 
5386                 oils_obj:fieldmapper="action::user_circ_history" 
5387                 oils_persist:tablename="action.usr_circ_history" 
5388                 reporter:label="User Checkout History">
5389                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
5390                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5391                         <!-- prevent reporting on the user that owns the checkout history -->
5392                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
5393                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5394                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
5395                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
5396                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
5397                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
5398                 </fields>
5399                 <links>
5400                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5401                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5402                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
5403                 </links>
5404         </class>
5405         <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">
5406                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
5407                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5408                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5409                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5410                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5411                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5412                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5413                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5414                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5415                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5416                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5417                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5418                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5419                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5420                 </fields>
5421                 <links>
5422                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5423                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5424                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5425                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5426                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5427                 </links>
5428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5429                         <actions>
5430                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5431                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5432                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5433                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5434                         </actions>
5435                 </permacrud>
5436         </class>
5437
5438         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5439                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5440                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5441                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5442                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5443                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5444                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5445                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5446                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5447                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5448                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5449                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5450                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5451                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5452                 </fields>
5453                 <links>
5454                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5455                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5456                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5457                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5458                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5459                 </links>
5460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5461                         <actions>
5462                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5463                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5464                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5465                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5466                         </actions>
5467                 </permacrud>
5468         </class>
5469         
5470         <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">
5471                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5472                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5473                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5474                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5475                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5476                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5477                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5478                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5479                 </fields>
5480                 <links>
5481                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5482                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5483                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5484                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5485                 </links>
5486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5487                         <actions>
5488                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5489                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5490                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5491                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5492                         </actions>
5493                 </permacrud>
5494         </class>
5495         
5496         <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">
5497                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5498                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5499                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5500                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5501                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5502                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5503                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5504                 </fields>
5505                 <links>
5506                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5507                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5508                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5509                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5510                 </links>
5511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5512                         <actions>
5513                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5514                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5515                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5516                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5517                         </actions>
5518                 </permacrud>
5519         </class>
5520         
5521         <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">
5522                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5523                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5524                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5525                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5526                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5527                 </fields>
5528                 <links>
5529                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5530                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5531                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5532                 </links>
5533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5534                         <actions>
5535                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5536                     <context link="resource" field="owner" />
5537                 </create>
5538                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5539                     <context link="resource" field="owner" />
5540                 </retrieve>
5541                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5542                     <context link="resource" field="owner" />
5543                 </update>
5544                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5545                     <context link="resource" field="owner" />
5546                 </delete>
5547                         </actions>
5548                 </permacrud>
5549         </class>
5550         
5551         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5552                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5553                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5554                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5555                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5556                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5557                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5558                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5559                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5560                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5561                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5562                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5563                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5564                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5565                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5566                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5567                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5568                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5569                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5570                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5571                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5572                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5573                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5574                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5575                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5576                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5577                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5578                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5579                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5580                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5581                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5582                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5583                 </fields>
5584                 <links>
5585                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5586                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5587                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5588                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5589                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5590                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5591                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5592                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5593                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5594                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5595                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5596                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5597                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5598                 </links>
5599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5600                         <actions>
5601                                 <create permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5602                                 <retrieve permission="VIEW_BOOKING_RESERVATION" context_field="pickup_lib"/>
5603                                 <update permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5604                                 <delete permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5605                         </actions>
5606                 </permacrud>
5607         </class>
5608         
5609         <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">
5610                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5611                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5612                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5613                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5614                 </fields>
5615                 <links>
5616                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5617                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5618                 </links>
5619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5620                         <actions>
5621                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5622                                         <context link="reservation" field="pickup_lib"/>
5623                                 </create>
5624                                 <retrieve permission="VIEW_BOOKING_RESERVATION_ATTR_MAP">
5625                                         <context link="reservation" field="pickup_lib"/>
5626                                 </retrieve>
5627                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5628                                         <context link="reservation" field="pickup_lib"/>
5629                                 </update>
5630                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5631                                         <context link="reservation" field="pickup_lib"/>
5632                                 </delete>
5633                         </actions>
5634                 </permacrud>
5635         </class>
5636
5637         <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">
5638                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5639                         <field name="bucket" reporter:datatype="link"/>
5640                         <field name="id" reporter:datatype="id" />
5641                         <field name="target_call_number" reporter:datatype="link" />
5642                         <field name="create_time" reporter:datatype="timestamp" />
5643                         <field name="pos" reporter:datatype="int" />
5644                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5645                 </fields>
5646                 <links>
5647                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5648                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5649             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5650                 </links>
5651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5652                         <actions>
5653                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5654                     <context link="bucket" owning_lib="owning_lib"/>
5655                 </retrieve>
5656             </actions>
5657         </permacrud>
5658         </class>
5659         <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">
5660                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5661                         <field name="id" reporter:datatype="id" />
5662                         <field name="item" reporter:datatype="link"/>
5663                         <field name="note" reporter:datatype="text" />
5664                 </fields>
5665                 <links>
5666                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5667                 </links>
5668         </class>
5669         <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">
5670                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5671                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5672                         <field name="btype" reporter:datatype="text"/>
5673                         <field name="id" reporter:datatype="id" />
5674                         <field name="name" reporter:datatype="text"/>
5675                         <field name="description" reporter:datatype="text"/>
5676                         <field name="owner" reporter:datatype="link"/>
5677                         <field name="pub" reporter:datatype="bool"/>
5678                         <field name="create_time" reporter:datatype="timestamp" />
5679                         <field name="owning_lib" reporter:datatype="org_unit" />
5680                 </fields>
5681                 <links>
5682                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5683                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5684                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5685                 </links>
5686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5687                         <actions>
5688                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5689                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5690                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5691                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5692                         </actions>
5693                 </permacrud>
5694         </class>
5695         <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">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5697                         <field name="id" reporter:datatype="id" />
5698                         <field name="bucket" reporter:datatype="link"/>
5699                         <field name="note" reporter:datatype="text" />
5700                 </fields>
5701                 <links>
5702                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5703                 </links>
5704         </class>
5705         <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">
5706                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5707                         <field name="hold" reporter:datatype="link"/>
5708                         <field name="id" reporter:datatype="id" />
5709                         <field name="target_copy" reporter:datatype="link"/>
5710                         <field name="proximity" reporter:datatype="number"/>
5711                 </fields>
5712                 <links>
5713                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5714                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5715                 </links>
5716         </class>
5717         <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">
5718                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5719                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5720                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5721                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5722                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5723                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5724                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5725                 </fields>
5726                 <links>
5727                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5728                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5729                 </links>
5730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5731             <actions>
5732                 <create permission="CREATE_HOLD_NOTIFICATION">
5733                                         <context link="hold" jump="usr" field="home_ou" />
5734                                 </create>
5735                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5736                                         <context link="hold" jump="usr" field="home_ou" />
5737                                 </retrieve>
5738                 <update permission="CREATE_HOLD_NOTIFICATION">
5739                                         <context link="hold" jump="usr" field="home_ou" />
5740                                 </update>
5741                 <delete permission="CREATE_HOLD_NOTIFICATION">
5742                                         <context link="hold" jump="usr" field="home_ou" />
5743                                 </delete>
5744             </actions>
5745         </permacrud>
5746         </class>
5747         <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">
5748                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5749                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5750                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5751                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5752                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5753                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5754                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5755                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5756                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5757                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5758                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5759                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5760                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5761                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5762                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5763                 </fields>
5764                 <links>
5765                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5766                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5767                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5768                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5769                 </links>
5770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5771             <actions>
5772                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5773                 <retrieve/>
5774                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5775                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5776             </actions>
5777         </permacrud>
5778         </class>
5779         <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">
5780                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5781                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5782                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5783                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5784                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" />
5785             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5786             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5787             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5788                 </fields>
5789                 <links>
5790                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5791                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5792                 </links>
5793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5794             <actions>
5795                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5796                 <retrieve/>
5797                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5798                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5799             </actions>
5800         </permacrud>
5801         </class>
5802         <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">
5803                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5804                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5805             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5806             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5807                 </fields>
5808                 <links>
5809                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5810                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5811                 </links>
5812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5813             <actions>
5814                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5815                                         <context link="lgroup" field="owner" />
5816                 </create>
5817                 <retrieve/>
5818                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5819                                         <context link="lgroup" field="owner" />
5820                 </update>
5821                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5822                                         <context link="lgroup" field="owner" />
5823                 </delete>
5824             </actions>
5825         </permacrud>
5826         </class>
5827
5828     <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">
5829         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5830             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5831             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5832             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5833             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5834         </fields>
5835         <links>
5836             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5837             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5838         </links>
5839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5840             <actions>
5841                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5842                 <retrieve/>
5843                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5844                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5845             </actions>
5846         </permacrud>
5847     </class>
5848
5849         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5850                 <fields>
5851                         <field name="sre_id" oils_persist:virtual="true" />
5852                         <field name="location" oils_persist:virtual="true" />
5853                         <field name="owning_lib" oils_persist:virtual="true" />
5854                         <field name="basic_holdings" oils_persist:virtual="true" />
5855                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5856                         <field name="supplement_holdings" oils_persist:virtual="true" />
5857                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5858                         <field name="index_holdings" oils_persist:virtual="true" />
5859                         <field name="index_holdings_add" oils_persist:virtual="true" />
5860                         <field name="online" oils_persist:virtual="true" />
5861                         <field name="missing" oils_persist:virtual="true" />
5862                         <field name="incomplete" oils_persist:virtual="true" />
5863                 </fields>
5864         </class>
5865
5866         <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">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5868                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5869                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5870                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5871                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5872                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5873                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5874                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5875                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5876                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5877                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5878                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5879                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5880                 </fields>
5881                 <links>
5882                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5883                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5884                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5885                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5886                 </links>
5887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5888                         <actions>
5889                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5890                                 <retrieve/>
5891                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5892                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5893                         </actions>
5894                 </permacrud>
5895         </class>
5896
5897         <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">
5898                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5899                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5900                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5901                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5902                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5903                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5904                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5906                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5907                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5908                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5909                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5910                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5911                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5912                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5913                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5914                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5915                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5916                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5917                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5918                 </fields>
5919                 <links>
5920                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5921                 </links>
5922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5923                         <actions>
5924                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5925                                         <context link="subscription" field="owning_lib" />
5926                                 </create>
5927                                 <retrieve />
5928                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5929                                         <context link="subscription" field="owning_lib" />
5930                                 </update>
5931                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5932                                         <context link="subscription" field="owning_lib" />
5933                                 </delete>
5934                         </actions>
5935                 </permacrud>
5936         </class>
5937
5938         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5939                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5940                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5941                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5942                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5943                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5944                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5945                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5946                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5947                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5948                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5949                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5950                 </fields>
5951                 <links>
5952                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5953                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5954                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5955                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5956                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5957                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5958                 </links>
5959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5960                         <actions>
5961                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5962                                 <retrieve />
5963                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5964                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5965                         </actions>
5966                 </permacrud>
5967         </class>
5968
5969         <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">
5970                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5971                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5972                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5973                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5974                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5975                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5976                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5977                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5978                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5979                 </fields>
5980                 <links>
5981                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5982                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5983                 </links>
5984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5985                         <actions>
5986                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5987                     <context link="subscription" field="owning_lib"/>
5988                 </create>
5989                                 <retrieve />
5990                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5991                     <context link="subscription" field="owning_lib"/>
5992                 </update>
5993                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5994                     <context link="subscription" field="owning_lib"/>
5995                 </delete>
5996                         </actions>
5997                 </permacrud>
5998         </class>
5999
6000         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
6001                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
6002                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6003                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
6004                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
6005                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6006                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
6007                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6008                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
6009                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
6010                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
6011                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
6012                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
6013                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
6014                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
6015                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
6016                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6017                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6018                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6019                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6020                 </fields>
6021                 <links>
6022                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
6023                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6024                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
6025                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
6026                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
6027                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
6028                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
6029                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
6030                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
6031                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
6032                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
6033                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
6034                 </links>
6035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6036                         <actions>
6037                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6038                                 <retrieve />
6039                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6040                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6041                         </actions>
6042                 </permacrud>
6043         </class>
6044
6045         <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">
6046                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
6047                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6048                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6049                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6050                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6051                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6052                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6053                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6054                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6055                 </fields>
6056                 <links>
6057                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6058                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6059                 </links>
6060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6061                         <actions>
6062                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6063                                         <context link="distribution" field="holding_lib" />
6064                                 </create>
6065                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
6066                                         <context link="distribution" field="holding_lib" />
6067                                 </retrieve>
6068                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6069                                         <context link="distribution" field="holding_lib" />
6070                                 </update>
6071                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6072                                         <context link="distribution" field="holding_lib" />
6073                                 </delete>
6074                         </actions>
6075                 </permacrud>
6076         </class>
6077
6078         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
6079                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
6080                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6081                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6082                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
6083                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6084                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
6085                 </fields>
6086                 <links>
6087                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6088                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
6089                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
6090                 </links>
6091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6092                         <actions>
6093                                 <create permission="ADMIN_SERIAL_STREAM">
6094                                         <context link="distribution" field="holding_lib" />
6095                                 </create>
6096                                 <retrieve />
6097                                 <update permission="ADMIN_SERIAL_STREAM">
6098                                         <context link="distribution" field="holding_lib" />
6099                                 </update>
6100                                 <delete permission="ADMIN_SERIAL_STREAM">
6101                                         <context link="distribution" field="holding_lib" />
6102                                 </delete>
6103                         </actions>
6104                 </permacrud>
6105         </class>
6106
6107         <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">
6108                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
6109                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6110                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6111                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
6112                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
6113                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
6114                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6115                 </fields>
6116                 <links>
6117                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6118                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
6119                 </links>
6120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6121                         <actions>
6122                                 <create permission="ADMIN_SERIAL_STREAM">
6123                                         <context link="stream" jump="distribution" field="holding_lib" />
6124                                 </create>
6125                                 <retrieve permission="RECEIVE_SERIAL">
6126                                         <context link="stream" jump="distribution" field="holding_lib" />
6127                                 </retrieve>
6128                                 <update permission="ADMIN_SERIAL_STREAM">
6129                                         <context link="stream" jump="distribution" field="holding_lib" />
6130                                 </update>
6131                                 <delete permission="ADMIN_SERIAL_STREAM">
6132                                         <context link="stream" jump="distribution" field="holding_lib" />
6133                                 </delete>
6134                         </actions>
6135                 </permacrud>
6136         </class>
6137
6138         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
6139                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
6140                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6141                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6142                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6143                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6144                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6145                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6146                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
6147                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6148                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
6149                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
6150                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
6151                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
6152                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6153                 </fields>
6154                 <links>
6155                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6156                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6157                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6158                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
6159                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
6160                 </links>
6161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6162                         <actions>
6163                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
6164                                         <context link="subscription" field="owning_lib" />
6165                                 </create>
6166                                 <retrieve/>
6167                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
6168                                         <context link="subscription" field="owning_lib" />
6169                                 </update>
6170                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
6171                                         <context link="subscription" field="owning_lib" />
6172                                 </delete>
6173                         </actions>
6174                 </permacrud>
6175         </class>
6176
6177         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
6178                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6179                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6180                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6181                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6182                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6183                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6184                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6185                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6186                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6187                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6188                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6189                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6190                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6191                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6192                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6193                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6194                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6195                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6196                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6197                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6198                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6199                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6200                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6201                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6202                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6203                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6204                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6205                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6206                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6207                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6208                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6209                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6210                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6211                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6212                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
6213                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
6214                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
6215                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6216                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6217                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6218                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6219                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6220                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6221                 </fields>
6222                 <links>
6223                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6224                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6225                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6226                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6227                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6228                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6229                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6230                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6231                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6232                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6233                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6234                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6235                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6236                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6237                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6238                 </links>
6239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6240                         <actions>
6241                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6242                                 <retrieve/>
6243                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6244                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6245                         </actions>
6246                 </permacrud>
6247         </class>
6248
6249         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
6250                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
6251                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6252                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6253                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6254                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6255                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6256                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
6257                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6258                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
6259                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
6260                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
6261                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
6262                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6263                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6264                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
6265                 </fields>
6266                 <links>
6267                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6268                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6269                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6270                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6271                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
6272                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
6273                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
6274                 </links>
6275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6276                         <actions>
6277                                 <create permission="ADMIN_SERIAL_ITEM">
6278                                         <context link="stream" jump="distribution" field="holding_lib" />
6279                                 </create>
6280                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6281                                         <context link="stream" jump="distribution" field="holding_lib" />
6282                                 </retrieve>
6283                                 <update permission="ADMIN_SERIAL_ITEM">
6284                                         <context link="stream" jump="distribution" field="holding_lib" />
6285                                 </update>
6286                                 <delete permission="ADMIN_SERIAL_ITEM">
6287                                         <context link="stream" jump="distribution" field="holding_lib" />
6288                                 </delete>
6289                         </actions>
6290                 </permacrud>
6291         </class>
6292
6293         <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">
6294                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
6295                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6296                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
6297                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6298                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6299                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6300                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6301                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6302                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6303                 </fields>
6304                 <links>
6305                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6306                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6307                 </links>
6308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6309                         <actions>
6310                                 <create permission="ADMIN_SERIAL_ITEM">
6311                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6312                                 </create>
6313                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6314                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6315                                 </retrieve>
6316                                 <update permission="ADMIN_SERIAL_ITEM">
6317                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6318                                 </update>
6319                                 <delete permission="ADMIN_SERIAL_ITEM">
6320                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6321                                 </delete>
6322                         </actions>
6323                 </permacrud>
6324         </class>
6325         <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">
6326                 <fields>
6327                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
6328                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
6329                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
6330                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
6331                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
6332                 </fields>
6333                 <links>
6334                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6335                 </links>
6336         </class>
6337         <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">
6338                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
6339                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6340                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
6341                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
6342                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
6343                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
6344                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
6345                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
6346                 </fields>
6347                 <links>
6348                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6349                 </links>
6350         </class>
6351         <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">
6352                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
6353                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6354                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6355                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6356                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6357                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6358                 </fields>
6359                 <links>
6360                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6361                 </links>
6362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6363                         <actions>
6364                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6365                                         <context link="distribution" field="holding_lib" />
6366                                 </create>
6367                                 <retrieve/>
6368                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6369                                         <context link="distribution" field="holding_lib" />
6370                                 </update>
6371                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6372                                         <context link="distribution" field="holding_lib" />
6373                                 </delete>
6374                         </actions>
6375                 </permacrud>
6376         </class>
6377
6378         <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">
6379                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
6380                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6381                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6382                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6383                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6384                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6385                 </fields>
6386                 <links>
6387                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6388                 </links>
6389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6390                         <actions>
6391                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6392                                         <context link="distribution" field="holding_lib" />
6393                                 </create>
6394                                 <retrieve/>
6395                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6396                                         <context link="distribution" field="holding_lib" />
6397                                 </update>
6398                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6399                                         <context link="distribution" field="holding_lib" />
6400                                 </delete>
6401                         </actions>
6402                 </permacrud>
6403         </class>
6404
6405         <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">
6406                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
6407                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6408                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6409                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6410                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6411                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6412                 </fields>
6413                 <links>
6414                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6415                 </links>
6416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6417                         <actions>
6418                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6419                                         <context link="distribution" field="holding_lib" />
6420                                 </create>
6421                                 <retrieve/>
6422                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6423                                         <context link="distribution" field="holding_lib" />
6424                                 </update>
6425                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6426                                         <context link="distribution" field="holding_lib" />
6427                                 </delete>
6428                         </actions>
6429                 </permacrud>
6430         </class>
6431
6432         <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">
6433                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6434                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6435                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6436                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6437                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6438                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6439                 </fields>
6440                 <links>
6441                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6442                 </links>
6443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6444                         <actions>
6445                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6446                                 <retrieve/>
6447                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6448                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6449                         </actions>
6450                 </permacrud>
6451         </class>
6452
6453         <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">
6454                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6455                         <field name="id" reporter:datatype="id" />
6456                         <field name="owning_copy" reporter:datatype="link"/>
6457                         <field name="stat_cat" reporter:datatype="link"/>
6458                         <field name="stat_cat_entry" reporter:datatype="link"/>
6459                 </fields>
6460                 <links>
6461                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6462                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6463                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6464                 </links>
6465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6466                         <actions>
6467                                 <retrieve/>
6468                         </actions>
6469                 </permacrud>
6470         </class>
6471         <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">
6472                 <fields oils_persist:primary="code">
6473                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6474                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6475                 </fields>
6476                 <links/>
6477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6478             <actions>
6479                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6480                 <retrieve/>
6481                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6482                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6483             </actions>
6484         </permacrud>
6485         </class>
6486         <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">
6487                 <fields oils_persist:primary="code">
6488                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6489                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6490                 </fields>
6491                 <links/>
6492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6493             <actions>
6494                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6495                 <retrieve/>
6496                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6497                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6498             </actions>
6499         </permacrud>
6500         </class>
6501         <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">
6502                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6503                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6504                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6505                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6506                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6507                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6508                 </fields>
6509                 <links>
6510             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6511         </links>
6512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6513             <actions>
6514                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6515                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6516                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6517                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6518             </actions>
6519         </permacrud>
6520         </class>
6521         <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">
6522                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6523                         <field reporter:label="Library Group ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6524                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6525                         <field reporter:label="Global?" name="global" reporter:datatype="bool"/>
6526                         <field reporter:label="Maps" name="maps" oils_persist:virtual="true" reporter:datatype="link"/>
6527                 </fields>
6528                 <links>
6529                         <link field="maps" reltype="has_many" key="lasso" map="" class="lmap"/>
6530         </links>
6531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6532             <actions>
6533                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6534                 <retrieve/>
6535                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6536                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6537             </actions>
6538         </permacrud>
6539         </class>
6540         <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">
6541                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6542                         <field reporter:label="Library Group Map ID" name="id" reporter:datatype="id" />
6543                         <field reporter:label="Library Group" name="lasso" reporter:datatype="link"/>
6544                         <field reporter:label="Organizational Unit" name="org_unit" reporter:datatype="org_unit"/>
6545                 </fields>
6546                 <links>
6547                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6548                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6549                 </links>
6550         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6551             <actions>
6552                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6553                 <retrieve/>
6554                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6555                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6556             </actions>
6557         </permacrud>
6558         </class>
6559         <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">
6560                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6561                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6562                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6563                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6564                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6565                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6566                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6567                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6568                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6569                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6570                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6571                 </fields>
6572                 <links>
6573                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6574                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6575                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6576                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6577                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6578                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6579                 </links>
6580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6581             <actions>
6582                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6583                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6584                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6585                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6586             </actions>
6587         </permacrud>
6588         </class>
6589         <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">
6590                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6591                         <field name="id" reporter:datatype="id" />
6592                         <field name="from_org" reporter:datatype="org_unit"/>
6593                         <field name="to_org" reporter:datatype="org_unit"/>
6594                         <field name="prox" reporter:datatype="int" />
6595                 </fields>
6596                 <links>
6597                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6598                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6599                 </links>
6600         </class>
6601         <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">
6602                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6603                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6604                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6605                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6606                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6607                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6608                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6609                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6610                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6611                 </fields>
6612                 <links/>
6613         </class>
6614         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6615                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6616                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6617                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6618                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6619                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6620                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6621                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6622                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6623                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6624                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6625                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6626                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6627                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6628                 </fields>
6629                 <links>
6630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6631                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6632                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6633                 </links>
6634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6635             <actions>
6636                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6637                 <retrieve/>
6638                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6639                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6640             </actions>
6641         </permacrud>
6642         </class>
6643         <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">
6644                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6645                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6646                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6647                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6648                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6649                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6650                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6651                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6652                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6653                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6654                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6655                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6656                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6657                         <field name="latitude" reporter:label="Latitude" reporter:datatype="float"/>
6658                         <field name="longitude" reporter:label="Longitude" reporter:datatype="float"/>
6659                 </fields>
6660                 <links>
6661                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6662                 </links>
6663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6664             <actions>
6665                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6666                 <retrieve/>
6667                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6668                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6669             </actions>
6670         </permacrud>
6671         </class>
6672         <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">
6673                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6674                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6675                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6676                         <field name="query_text" reporter:datatype="text"/>
6677                 </fields>
6678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6679             <actions>
6680                 <retrieve/>
6681             </actions>
6682         </permacrud>
6683         </class>
6684
6685         <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">
6686                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6687                         <field name="id" reporter:datatype="id" reporter:selector="label" reporter:label="ID" oils_obj:required="true"/>
6688                         <field name="owner" reporter:datatype="org_unit" reporter:label="Owning Org Unit" oils_obj:required="true"/>
6689                         <field name="code" reporter:datatype="text" reporter:label="Code" oils_obj:required="true"/>
6690                         <field name="label" reporter:datatype="text" oils_persist:i18n="true" reporter:label="Label" oils_obj:required="true"/>
6691                         <field name="create_date" reporter:datatype="timestamp" reporter:label="Create Date"/>
6692                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link" reporter:label="Group Entries"/>
6693                 </fields>
6694                 <links>
6695                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6696                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6697                 </links>
6698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6699             <actions>
6700                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6701                 <retrieve/>
6702                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6703                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6704             </actions>
6705         </permacrud>
6706         </class>
6707         <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">
6708                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6709                         <field name="id" reporter:datatype="id" reporter:label="ID" oils_obj:required="true"/>
6710                         <field name="grp" reporter:datatype="link" reporter:label="Search Filter Group" oils_obj:required="true"/>
6711                         <field name="pos" reporter:datatype="int" reporter:label="Position" oils_obj:required="true"/>
6712                         <field name="query" reporter:datatype="link" reporter:label="Query" oils_obj:required="true"/>
6713                 </fields>
6714                 <links>
6715                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6716                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6717                 </links>
6718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6719             <actions>
6720                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6721                     <context link="grp" field="owner"/>
6722                 </create>
6723                 <retrieve/>
6724                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6725                     <context link="grp" field="owner"/>
6726                 </update>
6727                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6728                     <context link="grp" field="owner"/>
6729                 </delete>
6730             </actions>
6731         </permacrud>
6732         </class>
6733
6734         <!-- A note: Please update alhr and ahopl when updating ahr -->
6735         <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">
6736                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6737                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6738                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6739                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6740                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6741                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6742                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6743                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6744                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6745                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6746                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6747                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6748                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6749                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6750                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6751                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6752                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6753                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6754                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6755                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6756                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6757                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6758                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6759                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6760                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6761                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6762                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6764                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6765                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6768                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6769                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6770                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6771                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6772                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6773                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6774                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6775                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6776                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6777                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6778                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6779                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6780                 </fields>
6781                 <links>
6782                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6783                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6784                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6785                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6786                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6787                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6788                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6789                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6790                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6791                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6792                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6793                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6794                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6795                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6796                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6797                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6798                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6799                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6800                 </links>
6801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6802                         <actions>
6803                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6804                         </actions>
6805                 </permacrud>
6806         </class>
6807         <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">
6808                 <oils_persist:source_definition><![CDATA[
6809                 SELECT
6810                         ahr.*,
6811                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6812                                 copy_location_order_position,
6813                         CASE WHEN au.alias IS NOT NULL THEN
6814                                 au.alias
6815                         ELSE
6816                                 au.first_given_name
6817                         END AS usr_alias_or_first_given_name,
6818                         au.first_given_name AS usr_first_given_name,
6819                         au.second_given_name AS usr_second_given_name,
6820                         au.family_name AS usr_family_name,
6821                         au.prefix AS usr_prefix,
6822                         au.suffix AS usr_suffix,
6823                         au.alias AS usr_alias,
6824                         CASE WHEN au.alias IS NOT NULL THEN
6825                                 au.alias
6826                         ELSE
6827                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6828                                         COALESCE(au.family_name, ''),
6829                                         COALESCE(au.suffix, ''),
6830                                         ', ',
6831                                         COALESCE(au.prefix, ''),
6832                                         COALESCE(au.first_given_name, ''),
6833                                         COALESCE(au.second_given_name, '')
6834                                 ], ' '), E'\\s+,', ',')
6835                         END AS usr_alias_or_display_name,
6836                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6837                                 COALESCE(au.family_name, ''),
6838                                 COALESCE(au.suffix, ''),
6839                                 ', ',
6840                                 COALESCE(au.prefix, ''),
6841                                 COALESCE(au.first_given_name, ''),
6842                                 COALESCE(au.second_given_name, '')
6843                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6844                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6845                                 AS call_number_label,
6846                         siss.label AS issuance_label,
6847                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6848                         ahcm_1.copy_count AS potential_copies
6849                 FROM action.hold_request ahr
6850                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6851                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6852                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6853                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6854                 JOIN actor.usr au ON (au.id = ahr.usr)
6855                 JOIN (
6856                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6857                         FROM asset.copy_location
6858                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6859                 LEFT JOIN actor.usr_standing_penalty ausp 
6860                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6861                 LEFT JOIN config.standing_penalty csp
6862                         ON (
6863                                 csp.id = ausp.standing_penalty AND 
6864                                 csp.block_list LIKE '%CAPTURE%' AND (
6865                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6866                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6867                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6868                                         )
6869                                 )
6870                         )
6871                 JOIN (
6872                         SELECT COUNT(target_copy) AS copy_count, hold
6873                         FROM action.hold_copy_map
6874                         GROUP BY 2
6875                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6876                 LEFT JOIN serial.issuance siss
6877                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6878                 LEFT JOIN asset.copy_location_order acplo
6879                         ON (acp.location = acplo.location AND
6880                                 acp.circ_lib = acplo.org)
6881                 WHERE
6882                         ahr.capture_time IS NULL AND
6883                         ahr.cancel_time IS NULL AND
6884                         csp.id IS NULL AND
6885                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6886                         acp.status IN (0,7)
6887                 ]]></oils_persist:source_definition>
6888                 <fields oils_persist:primary="id">
6889                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6890                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6891                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6892                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6893                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6894                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6895                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6896                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6897                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6898                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6899                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6900                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6901                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6902                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6903                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6904                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6905                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6906                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6907                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6908                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6909                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6910                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6911                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6912                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6913                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6914                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6915                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6916                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6917                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6918                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6919                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6920                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6921                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6922                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6923                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6924                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6925                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6926                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6927                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6928                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6929                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6930                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6931                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6932                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6933                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6934                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6935                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6936                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6937                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6938                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6939                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6940                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6941                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6942                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6943                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6944                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6945                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6946                 </fields>
6947                 <links>
6948                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6949                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6950                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6951                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6952                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6953                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6954                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6955                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6956                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6957                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6958                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6959                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6960                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6961                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6962                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6963                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6964                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6965                 </links>
6966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6967                         <actions>
6968                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6969                         </actions>
6970                 </permacrud>
6971         </class>
6972         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6973                 <oils_persist:source_definition><![CDATA[
6974                         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)
6975                 ]]></oils_persist:source_definition>
6976                 <fields oils_persist:primary="id">
6977                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6978                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6979                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6980                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6981                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6982                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6983                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6984                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6985                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6986                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6987                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6988                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6989                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6990                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6991                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6992                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6993                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6994                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6995                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6996                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6997                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6998                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6999                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7000                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
7001                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
7002                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
7003                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7004                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
7005                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7006                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7007                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7008                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7009                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7010                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7011                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7012                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7013                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
7014                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7015                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
7016                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
7017                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
7018                 </fields>
7019                 <links>
7020                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7021                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7022                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7023                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7024                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
7025                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7026                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7027                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7028                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
7029                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
7030                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
7031                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7032                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7033                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
7034                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7035                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
7036                 </links>
7037         </class>
7038
7039         <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">
7040                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
7041                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7042                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7043                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7044                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
7045                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
7046                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
7047                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
7048                 </fields>
7049                 <links>
7050                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7051                 </links>
7052                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7053                         <actions>
7054                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
7055                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
7056                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
7057                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
7058                         </actions>
7059                 </permacrud>
7060         </class>
7061         <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">
7062                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7063                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7064                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7065                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7066                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7067                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7068                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7069                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7070                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7071                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7072                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7073                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7074                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7075                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7076                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7077                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7078                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7079                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7080                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7081                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7082                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7083                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7084                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7085                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7086                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7087                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7088                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7089                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7090                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7091                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7092                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7093                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7094                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7095                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7096                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7097                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7098                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7099                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
7100                 </fields>
7101                 <links>
7102                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7103                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7104                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7105                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7106                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7107                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7108                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7109                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7110                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7111                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7112                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7113                 </links>
7114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7115                         <actions>
7116                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7117                         </actions>
7118                 </permacrud>
7119         </class>
7120         <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">
7121                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7122                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7123                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7124                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7125                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7126                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7127                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7128                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7129                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7130                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7131                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7132                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7133                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7134                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7135                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7136                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7137                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7138                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7139                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7140                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7141                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7142                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7143                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7144                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7145                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7146                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7147                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7148                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7149                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7150                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7151                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7152                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7153                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7154                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7155                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7156                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7157                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7158                 </fields>
7159                 <links>
7160                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7161                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7162                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7163                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7164                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7165                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7166                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7167                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7168                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7169                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7170                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7171                 </links>
7172                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7173                         <actions>
7174                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7175                         </actions>
7176                 </permacrud>
7177         </class>
7178
7179         <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">
7180                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
7181                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
7182                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
7183                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
7184                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
7185                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
7186                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
7187                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
7188                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
7189                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
7190                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
7191                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7192                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
7193                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7194                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
7195                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
7196                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
7197                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7198                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
7199                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
7200                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
7201                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
7202                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
7204                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
7212                 </fields>
7213                 <links>
7214                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
7215                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
7216                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
7217                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
7218                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
7219                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
7220                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7221                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
7222                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
7223                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
7224                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
7225                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
7226                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
7227                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
7228                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
7229                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
7230                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
7231                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
7232                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
7233                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
7234                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
7235                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
7236                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
7237                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
7238                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
7239                 </links>
7240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7241             <actions>
7242                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
7243                 <retrieve />
7244                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
7245                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
7246             </actions>
7247         </permacrud>
7248         </class>
7249         <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">
7250                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
7251                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7252                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
7253                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
7254                 </fields>
7255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7256                         <actions>
7257                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7258                                 <retrieve/>
7259                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7260                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7261                         </actions>
7262                 </permacrud>
7263         </class>
7264         <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">
7265                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
7266                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7267                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
7268                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
7269                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
7270                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
7271                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
7272                 </fields>
7273                 <links>
7274                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
7275                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7276                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
7277                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
7278                 </links>
7279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7280                         <actions>
7281                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7282                                 <retrieve/>
7283                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7284                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7285                         </actions>
7286                 </permacrud>
7287         </class>
7288         <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">
7289                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
7290                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7291                         <field name="btype" reporter:datatype="text"/>
7292                         <field name="id" reporter:datatype="id" />
7293                         <field name="name"  reporter:datatype="text"/>
7294                         <field name="description" reporter:datatype="text"/>
7295                         <field name="owner" reporter:datatype="link"/>
7296                         <field name="pub" reporter:datatype="bool"/>
7297                         <field name="create_time" reporter:datatype="timestamp" />
7298                         <field name="owning_lib" reporter:datatype="org_unit" />
7299                 </fields>
7300                 <links>
7301                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7302                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7303                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
7304                 </links>
7305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7306                         <actions>
7307                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7308                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7309                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7310                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7311                         </actions>
7312                 </permacrud>
7313         </class>
7314         <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">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
7316                         <field name="id" reporter:datatype="id" />
7317                         <field name="bucket" reporter:datatype="link"/>
7318                         <field name="note" reporter:datatype="text" />
7319                 </fields>
7320                 <links>
7321                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
7322                 </links>
7323         </class>
7324         <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">
7325                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
7326                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7327                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7328                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7329                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7330                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7331                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7332                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7333                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7334                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7335                 </fields>
7336                 <links>
7337                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7338                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
7339                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
7340                 </links>
7341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7342                         <actions>
7343                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7344                         </actions>
7345                 </permacrud>
7346         </class>
7347         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
7348                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
7349                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
7350                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7351                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
7352                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7353                 </fields>
7354                 <links>
7355                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7356                 </links>
7357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7358                         <actions>
7359                                 <retrieve permission="VIEW_USER user_request.view">
7360                                         <context link="usr" field="home_ou" />
7361                                 </retrieve>
7362                         </actions>
7363                 </permacrud>
7364         </class>
7365     <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">
7366         <fields oils_persist:primary="field">
7367             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7368             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7369             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7370         </fields>
7371         <links/>
7372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7373             <actions>
7374                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
7375                 <retrieve />
7376                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
7377                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
7378             </actions>
7379         </permacrud>
7380     </class>
7381         <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">
7382                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
7383                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7384                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7385                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7386                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7387                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7388                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7389                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
7390                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7391                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7392                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7393                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7394                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
7395                 </fields>
7396                 <links>
7397                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7398                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
7399                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
7400                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
7401                 </links>
7402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7403             <actions>
7404                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
7405                 <retrieve />
7406                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
7407                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
7408             </actions>
7409         </permacrud>
7410         </class>
7411         <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">
7412                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
7413                         <field name="field" reporter:datatype="link"/>
7414                         <field name="id" reporter:datatype="id" />
7415                         <field name="source" reporter:datatype="link"/>
7416                         <field name="value"  reporter:datatype="text"/>
7417                 </fields>
7418                 <links>
7419                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7420                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7421                 </links>
7422         </class>
7423         <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">
7424                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
7425                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7426                         <field name="btype" reporter:datatype="text"/>
7427                         <field name="id" reporter:datatype="id" />
7428                         <field name="name"  reporter:datatype="text"/>
7429                         <field name="description" reporter:datatype="text"/>
7430                         <field name="owner" reporter:datatype="link"/>
7431                         <field name="pub" reporter:datatype="bool"/>
7432                         <field name="create_time" reporter:datatype="timestamp" />
7433                         <field name="owning_lib" reporter:datatype="org_unit" />
7434                 </fields>
7435                 <links>
7436                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7437                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7438                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7439                 </links>
7440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7441                         <actions>
7442                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7443                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7444                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7445                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7446                         </actions>
7447                 </permacrud>
7448         </class>
7449         <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">
7450                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7451                         <field name="id" reporter:datatype="id" />
7452                         <field name="bucket" reporter:datatype="link"/>
7453                         <field name="note" reporter:datatype="text" />
7454                 </fields>
7455                 <links>
7456                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7457                 </links>
7458         </class>
7459         <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">
7460                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7461                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7462                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7463                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7464                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7465                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7466                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7467                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7468                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7469                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7470                 </fields>
7471                 <links>
7472                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7473                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7474                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7475                 </links>
7476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7477             <actions>
7478                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7479                     <context link="xact" jump="usr" field="home_ou"/>
7480                 </retrieve>
7481                         </actions>
7482                 </permacrud>
7483         </class>
7484         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7485                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7486                         <field name="id" reporter:datatype="id" />
7487                         <field name="ind1" />
7488                         <field name="ind2" />
7489                         <field name="record" />
7490                         <field name="subfield" />
7491                         <field name="tag" />
7492                         <field name="value" />
7493                 </fields>
7494                 <links>
7495                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7496                 </links>
7497         </class>
7498         <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">
7499                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7500                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7501                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7502                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7503                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7504                 </fields>
7505                 <links>
7506                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7507                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7508                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7509                 </links>
7510         </class>
7511         <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">
7512                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7513                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7514                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7515                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7516                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7517                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7518                 </fields>
7519                 <links>
7520                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7521                 </links>
7522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7523             <actions>
7524                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7525                 <retrieve/>
7526                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7527                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7528             </actions>
7529         </permacrud>
7530
7531         </class>
7532         <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">
7533                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7534                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7535                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7536                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7537                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7538                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7539                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7540                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7541                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7542                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7543                 </fields>
7544                 <links>
7545                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7546                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7547                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7548                 </links>
7549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7550             <actions>
7551                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7552                 <retrieve/>
7553                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7554                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7555             </actions>
7556         </permacrud>
7557         </class>
7558         <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">
7559                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7560                         <field reporter:label="Creation Date" name="create_date" reporter:datatype="timestamp"/>
7561                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7562                         <field reporter:label="Last Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7563                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7564                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
7565                         <field reporter:label="Public" name="pub" reporter:datatype="bool"/>
7566                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
7567                         <field reporter:label="Note" name="value" reporter:datatype="text"/>
7568                         <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/> 
7569                 </fields>
7570                 <links>
7571                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7572                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7573                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7574                 </links>
7575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7576                 <actions>
7577                     <create permission="CREATE_RECORD_NOTE" global_required="true"/>
7578                     <retrieve/>
7579                     <update permission="UPDATE_RECORD_NOTE" global_required="true"/>
7580                     <delete permission="DELETE_RECORD_NOTE" global_required="true"/>
7581                 </actions>
7582              </permacrud>
7583         </class>
7584         <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">
7585                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7586                         <field name="balance_owed" reporter:datatype="money" />
7587                         <field name="total_owed" reporter:datatype="money" />
7588                         <field name="total_paid" reporter:datatype="money" />
7589                         <field name="usr" reporter:datatype="link"/>
7590                 </fields>
7591                 <links>
7592                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7593                 </links>
7594         </class>
7595     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7596                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7597                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7598                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7599                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7600                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7601                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7602                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7603                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7604                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7605                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7606                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7607                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7608                 </fields>
7609                 <links>
7610                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7611                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7612                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7613                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7614                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7615                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7616                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7617                 </links>
7618         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7619             <actions>
7620                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7621             </actions>
7622         </permacrud>
7623         </class>
7624         <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">
7625                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7626                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7627                         <field name="quality" reporter:datatype="int" />
7628                         <field name="source" reporter:datatype="text"/>
7629                         <field name="transcendant" reporter:datatype="bool"/>
7630                         <field name="can_have_copies" reporter:datatype="bool"/>
7631                 </fields>
7632                 <links/>
7633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7634             <actions>
7635                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7636                 <retrieve/>
7637                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7638                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7639             </actions>
7640         </permacrud>
7641         </class>
7642         <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">
7643                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7644                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7645                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7646                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7647                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7648                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7649                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7650                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7651                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7652                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7653                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7654                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7655                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7656                 </fields>
7657                 <links>
7658                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7659                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7660                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7661                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7662                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7663                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7664                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7665                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7666                 </links>
7667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7668                         <actions>
7669                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7670                                         <context link="usr" field="home_ou" />
7671                                 </retrieve>
7672                         </actions>
7673                 </permacrud>
7674         </class>
7675         <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">
7676                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7677                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7678                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7679                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7680                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7681                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7682                 </fields>
7683                 <links>
7684                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7685                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7686                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7687                 </links>
7688         </class>
7689         <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">
7690                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7691                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7692                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7693                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7694                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7695                 </fields>
7696                 <links>
7697                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7698                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7699                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7700                 </links>
7701         </class>
7702         <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">
7703                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7704                         <field name="bucket" reporter:datatype="link"/>
7705                         <field name="id" reporter:datatype="id" />
7706                         <field name="target_user" reporter:datatype="link"/>
7707                         <field name="create_time" reporter:datatype="timestamp" />
7708                         <field name="pos" reporter:datatype="int" />
7709                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7710                 </fields>
7711                 <links>
7712                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7713                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7714             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7715                 </links>
7716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7717                         <actions>
7718                                 <retrieve permission="ADMIN_USER_BUCKET">
7719                     <context link="bucket" owning_lib="owning_lib"/>
7720                 </retrieve>
7721             </actions>
7722         </permacrud>
7723         </class>
7724         <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">
7725                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_id_seq">
7726                         <field name="id" reporter:datatype="id" />
7727                         <field name="staff" reporter:datatype="link"/>
7728                         <field name="bucket" reporter:datatype="link"/>
7729                         <field name="target" reporter:datatype="int" />
7730                         <field name="hold_type" reporter:datatype="text" />
7731                         <field name="run_date" reporter:datatype="timestamp" />
7732                         <field name="cancelled" reporter:datatype="timestamp" />
7733                         <field name="mappings" oils_persist:virtual="true" reporter:datatype="link" />
7734                 </fields>
7735                 <links>
7736                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7737                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7738                         <link field="mappings" reltype="has_many" key="batch_hold_event" map="" class="abhem"/>
7739                 </links>
7740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7741                         <actions>
7742                 <create permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7743                 <retrieve/>
7744                 <update permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7745                 <delete permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7746             </actions>
7747         </permacrud>
7748         </class>
7749         <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">
7750                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_map_id_seq">
7751                         <field name="id" reporter:datatype="id" />
7752                         <field name="batch_hold_event" reporter:datatype="link"/>
7753                         <field name="hold" reporter:datatype="link"/>
7754                 </fields>
7755                 <links>
7756                         <link field="batch_hold_event" reltype="has_a" key="id" map="" class="abhe"/>
7757                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7758                 </links>
7759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7760                         <actions>
7761                 <retrieve/>
7762             </actions>
7763         </permacrud>
7764         </class>
7765         <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">
7766                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7767                         <field name="id" reporter:datatype="id" />
7768                         <field name="item" reporter:datatype="link"/>
7769                         <field name="note" reporter:datatype="text" />
7770                 </fields>
7771                 <links>
7772                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7773                 </links>
7774         </class>
7775         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7776                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7777                         <field name="balance_owed" reporter:datatype="money" />
7778                         <field name="total_owed" reporter:datatype="money" />
7779                         <field name="total_paid" reporter:datatype="money" />
7780                         <field name="usr" reporter:datatype="link"/>
7781                 </fields>
7782                 <links>
7783                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7784                 </links>
7785         </class>
7786         <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">
7787                 <fields oils_persist:primary="code" oils_persist:sequence="">
7788                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7789                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7790                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7791                 </fields>
7792                 <links/>
7793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7794             <actions>
7795                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7796                 <retrieve/>
7797                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7798                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7799             </actions>
7800         </permacrud>
7801         </class>
7802         <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">
7803                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7804                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7805                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7806                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7807                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7808                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7809                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7810                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7811                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7812                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7813                 </fields>
7814                 <links>
7815                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7816                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7817                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7818                 </links>
7819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7820             <actions>
7821                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7822                     <context link="xact" jump="usr" field="home_ou"/>
7823                 </retrieve>
7824                         </actions>
7825                 </permacrud>
7826         </class>
7827         <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">
7828                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7829                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7830                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7831                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7832                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7833                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7834                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7835                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7836                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7837                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7838                 </fields>
7839                 <links>
7840                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7841                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7842                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7843                 </links>
7844         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7845             <actions>
7846                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7847                     <context link="xact" jump="usr" field="home_ou"/>
7848                 </retrieve>
7849                         </actions>
7850                 </permacrud>
7851         </class>
7852         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7853                 <fields oils_persist:primary="id" oils_persist:sequence="">
7854                         <field name="checkin_lib" reporter:datatype="link"/>
7855                         <field name="checkin_staff" reporter:datatype="link"/>
7856                         <field name="checkin_time" reporter:datatype="timestamp"/>
7857                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7858                         <field name="circ_staff" reporter:datatype="link"/>
7859                         <field name="desk_renewal" reporter:datatype="bool"/>
7860                         <field name="due_date" reporter:datatype="timestamp"/>
7861                         <field name="duration" reporter:datatype="interval"/>
7862                         <field name="duration_rule" reporter:datatype="link"/>
7863                         <field name="fine_interval" reporter:datatype="interval"/>
7864                         <field name="id" reporter:datatype="id" />
7865                         <field name="max_fine" reporter:datatype="money" />
7866                         <field name="max_fine_rule" reporter:datatype="link"/>
7867                         <field name="opac_renewal" reporter:datatype="bool"/>
7868                         <field name="phone_renewal" reporter:datatype="bool"/>
7869                         <field name="recurring_fine" reporter:datatype="money" />
7870                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7871                         <field name="renewal_remaining" reporter:datatype="int" />
7872             <field name="grace_period" reporter:datatype="interval" />
7873                         <field name="stop_fines" reporter:datatype="text"/>
7874                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7875                         <field name="target_copy" reporter:datatype="link"/>
7876                         <field name="usr" reporter:datatype="link"/>
7877                         <field name="xact_finish" reporter:datatype="timestamp" />
7878                         <field name="xact_start" reporter:datatype="timestamp" />
7879                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7880                         <field name="auto_renewal" reporter:datatype="bool"/>
7881                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7882                 </fields>
7883                 <links>
7884                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7885                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7886                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7887                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7888                 </links>
7889         </class>
7890         <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">
7891                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7892                         <field name="field" reporter:datatype="link"/>
7893                         <field name="id" reporter:datatype="id" />
7894                         <field name="source" reporter:datatype="link"/>
7895                         <field name="value" reporter:datatype="text"/>
7896                 </fields>
7897                 <links>
7898                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7899                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7900                 </links>
7901         </class>
7902         <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">
7903                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7904                         <field name="high" reporter:datatype="money" />
7905                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7906                         <field name="low" reporter:datatype="money" />
7907                         <field name="name" reporter:datatype="text"/>
7908                         <field name="normal" reporter:datatype="money" />
7909                         <field name="recurrence_interval" reporter:datatype="interval"/>
7910             <field name="grace_period" reporter:datatype="interval" />
7911                 </fields>
7912                 <links/>
7913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7914             <actions>
7915                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7916                 <retrieve/>
7917                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7918                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7919             </actions>
7920         </permacrud>
7921         </class>
7922         <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">
7923                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7924                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7925                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7926                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7927                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7928                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7929                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7930                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7931                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7932                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7933                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7934                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7935                 </fields>
7936                 <links>
7937                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7938                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7939                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7940                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7941                 </links>
7942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7943             <actions>
7944                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7945                     <context link="xact" jump="usr" field="home_ou"/>
7946                 </retrieve>
7947                         </actions>
7948                 </permacrud>
7949         </class>
7950         <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">
7951                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7952                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7953                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7954                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7955                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7956                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7957                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7958                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7959                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7960                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7961                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7962                 </fields>
7963                 <links>
7964                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7965                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7966                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7967                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7968                 </links>
7969         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7970             <actions>
7971                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7972                     <context link="xact" jump="usr" field="home_ou"/>
7973                 </retrieve>
7974                         </actions>
7975                 </permacrud>
7976         </class>
7977         <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">
7978                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7979                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7980                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7981                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7982                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7983                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7984                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7985                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7986                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7987                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7988                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7989                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7990                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7991                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7992                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7993                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7994                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7995                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7996                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7997                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7998                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7999                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8000                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
8001                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
8002                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8003                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
8004                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
8005                         <field reporter:label="Price" name="price" reporter:datatype="money" />
8006                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
8007                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
8008                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
8009                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
8010                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8011                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
8012                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
8013                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
8014                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8015                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8016                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8017                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
8018                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
8019                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
8020                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8021                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
8022                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
8023                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
8024                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
8025                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
8026                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
8027                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8028                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
8029                 </fields>
8030                 <links>
8031                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8032                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8033                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8034                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8035                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8036                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8037                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8038                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
8039                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
8040                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
8041                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
8042                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
8043                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
8044                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
8045                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
8046                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
8047                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8048                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
8049                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
8050                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
8051                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
8052                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
8053                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8054                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
8055                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
8056                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
8057                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8058                 </links>
8059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8060             <actions>
8061                 <create permission="CREATE_COPY">
8062                     <context link="call_number" field="owning_lib"/>
8063                 </create>
8064                 <retrieve/>
8065                 <update permission="UPDATE_COPY">
8066                     <context link="call_number" field="owning_lib"/>
8067                 </update>
8068                 <delete permission="DELETE_COPY">
8069                     <context link="call_number" field="owning_lib"/>
8070                 </delete>
8071             </actions>
8072         </permacrud>
8073         </class>
8074
8075         <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">
8076                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
8077             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
8078                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
8079                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
8080                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
8081                 </fields>
8082                 <links>
8083                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
8084                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8085                 </links>
8086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8087             <actions>
8088                                 <create/>
8089                                 <retrieve/>
8090                                 <update/>
8091                                 <delete/>
8092             </actions>
8093         </permacrud>
8094         </class>
8095
8096         <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">
8097                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
8098                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
8099                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
8100                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8101                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8102                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8103                         <field reporter:label="Event" name="event" reporter:datatype="text" />
8104                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
8105                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
8106                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
8107                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
8108                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
8109                 </fields>
8110                 <links>
8111                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
8112                 </links>
8113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8114             <actions>
8115                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8116                 <retrieve/>
8117                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8118                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
8119             </actions>
8120         </permacrud>
8121         </class>
8122
8123         <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">
8124                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
8125                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8126                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
8127                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8128                 </fields>
8129                 <links>
8130                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8131                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8132                 </links>
8133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8134             <actions>
8135                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8136                 <retrieve/>
8137                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8138                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
8139             </actions>
8140         </permacrud>
8141         </class>
8142
8143         <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">
8144                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
8145                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8146                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8147                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8148                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8149                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8150                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8151                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8152                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8153                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8154                 </fields>
8155                 <links>
8156                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8157                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8158                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8159                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8160                 </links>
8161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8162             <actions>
8163                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8164                     <context link="copy" field="circ_lib"/>
8165                 </create>
8166                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8167                     <context link="copy" field="circ_lib"/>
8168                                 </retrieve>
8169                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8170                     <context link="copy" field="circ_lib"/>
8171                                 </update>
8172                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8173                     <context link="copy" field="circ_lib"/>
8174                                 </delete>
8175             </actions>
8176         </permacrud>
8177         </class>
8178
8179         <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">
8180                 <fields oils_persist:primary="id">
8181                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8182                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8183                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8184                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8185                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8186                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8187                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8188                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8189                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8190                 </fields>
8191                 <links>
8192                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8193                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8194                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8195                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8196                 </links>
8197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8198             <actions>
8199                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8200                     <context link="copy" field="circ_lib"/>
8201                 </create>
8202                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8203                     <context link="copy" field="circ_lib"/>
8204                                 </retrieve>
8205                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8206                     <context link="copy" field="circ_lib"/>
8207                                 </update>
8208                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8209                     <context link="copy" field="circ_lib"/>
8210                                 </delete>
8211             </actions>
8212         </permacrud>
8213         </class>
8214
8215         <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">
8216                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
8217                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
8218                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
8219                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8220                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8221                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8222                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8223                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8224                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
8225                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
8226                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8227                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8228                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8229                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
8230                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
8231                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
8232                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
8233                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
8234                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
8235                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
8236                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
8237                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
8238                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
8239                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
8240                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8241                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
8242                 </fields>
8243                 <links>
8244                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8245                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8246                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8247                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8248                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8249                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8250                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8251                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8252                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8253                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8254                 </links>
8255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8256                         <actions>
8257                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8258                                 <retrieve />
8259                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8260                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8261                         </actions>
8262                 </permacrud>
8263         </class>
8264
8265         <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">
8266                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
8267                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
8268                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8269                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8270                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
8271                 </fields>
8272                 <links/>
8273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8274             <actions>
8275                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8276                 <retrieve/>
8277                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8278                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8279             </actions>
8280         </permacrud>
8281         </class>
8282         <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">
8283                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
8284                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
8285                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8286                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8287                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
8288                 </fields>
8289                 <links/>
8290         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8291             <actions>
8292                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8293                 <retrieve/>
8294                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8295                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8296             </actions>
8297         </permacrud>
8298         </class>
8299         <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">
8300                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
8301                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8302                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8303                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8304                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8305                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8306                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
8307                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
8308                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
8309                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
8310                 </fields>
8311                 <links>
8312                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
8313                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
8314                 </links>
8315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8316             <actions>
8317                 <create permission="CREATE_PERM" global_required="true"/>
8318                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8319                 <update permission="UPDATE_PERM" global_required="true"/>
8320                 <delete permission="DELETE_PERM" global_required="true"/>
8321             </actions>
8322         </permacrud>
8323         </class>
8324         <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">
8325                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
8326                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8327                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
8328                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8329                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
8330                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8331                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8332                 </fields>
8333                 <links>
8334                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
8335                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8336                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8337                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
8338                 </links>
8339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8340                         <actions>
8341                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8342                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8343                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8344                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8345                         </actions>
8346                 </permacrud>
8347         </class>
8348         <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">
8349                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
8350                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
8351                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
8352                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
8353                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
8354                 </fields>
8355                 <links>
8356                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
8357                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
8358                 </links>
8359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8360             <actions>
8361                 <create permission="ADMIN_SURVEY">
8362                     <context link="question" jump="survey" field="owner"/>
8363                 </create>
8364                 <retrieve/>
8365                 <update permission="ADMIN_SURVEY">
8366                     <context link="question" jump="survey" field="owner"/>
8367                 </update>
8368                 <delete permission="ADMIN_SURVEY">
8369                     <context link="question" jump="survey" field="owner"/>
8370                 </delete>
8371             </actions>
8372         </permacrud>
8373         </class>
8374         <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">
8375                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
8376                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8377                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
8378                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
8379                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
8380                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
8381                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
8382                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
8383                 </fields>
8384                 <links>
8385                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
8386                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
8387                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
8388                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8389                 </links>
8390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8391                         <actions>
8392                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
8393                         </actions>
8394                 </permacrud>
8395         </class>
8396         <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">
8397                 <fields oils_persist:primary="usr" oils_persist:sequence="">
8398                         <field name="balance_owed" reporter:datatype="money" />
8399                         <field name="total_owed" reporter:datatype="money" />
8400                         <field name="total_paid" reporter:datatype="money" />
8401                         <field name="usr" reporter:datatype="link"/>
8402                 </fields>
8403                 <links>
8404                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8405                 </links>
8406         </class>
8407         <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">
8408                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
8409                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
8410                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
8411                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
8412                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
8413                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8414                 </fields>
8415                 <links>
8416                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8417                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
8418                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8419                 </links>
8420         </class>
8421         <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">
8422                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
8423                         <field name="field" reporter:datatype="link"/>
8424                         <field name="id" reporter:datatype="id" />
8425                         <field name="source" reporter:datatype="link"/>
8426                         <field name="value" reporter:datatype="text"/>
8427                 </fields>
8428                 <links>
8429                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8430                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8431                 </links>
8432         </class>
8433         <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">
8434                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
8435                         <field name="field" reporter:datatype="link"/>
8436                         <field name="id" reporter:datatype="id" />
8437                         <field name="source" reporter:datatype="link"/>
8438                         <field name="value" reporter:datatype="text"/>
8439                 </fields>
8440                 <links>
8441                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8442                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8443                 </links>
8444         </class>
8445         <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">
8446                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
8447                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
8448                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
8449                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
8450                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
8451                 </fields>
8452                 <links>
8453                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
8454                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
8455                 </links>
8456         </class>
8457         <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">
8458                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
8459                         <field name="depth" reporter:datatype="int" />
8460                         <field name="grantable" reporter:datatype="bool"/>
8461                         <field name="grp" reporter:datatype="link"/>
8462                         <field name="id" reporter:datatype="id" />
8463                         <field name="perm" reporter:datatype="link"/>
8464                 </fields>
8465                 <links>
8466                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8467                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8468                 </links>
8469         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8470             <actions>
8471                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
8472                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
8473                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
8474                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
8475             </actions>
8476         </permacrud>
8477         </class>
8478         <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">
8479                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8480                         <field name="items" oils_persist:virtual="true" />
8481                         <field name="btype" reporter:datatype="text"/>
8482                         <field name="id" reporter:datatype="id" />
8483                         <field name="name" reporter:datatype="text"/>
8484                         <field name="description" reporter:datatype="text"/>
8485                         <field name="owner" reporter:datatype="link"/>
8486                         <field name="pub" reporter:datatype="bool"/>
8487                         <field name="create_time" reporter:datatype="timestamp" />
8488                         <field name="owning_lib" reporter:datatype="org_unit" />
8489                 </fields>
8490                 <links>
8491                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8492                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8493                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8494                 </links>
8495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8496                         <actions>
8497                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8498                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8499                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8500                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8501                         </actions>
8502                 </permacrud>
8503         </class>
8504         <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">
8505                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8506                         <field name="id" reporter:datatype="id" />
8507                         <field name="bucket" reporter:datatype="link"/>
8508                         <field name="note" reporter:datatype="text" />
8509                 </fields>
8510                 <links>
8511                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8512                 </links>
8513         </class>
8514         <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">
8515                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8516                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8517                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8518                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8519                 </fields>
8520                 <links>
8521                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8522                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8523                 </links>
8524         </class>
8525         <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">
8526                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8527                         <field name="depth" reporter:datatype="int"/>
8528                         <field name="grantable" reporter:datatype="bool"/>
8529                         <field name="id" reporter:datatype="id" />
8530                         <field name="perm" reporter:datatype="link"/>
8531                         <field name="usr" reporter:datatype="link"/>
8532                 </fields>
8533                 <links>
8534                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8535                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8536                 </links>
8537         </class>
8538         <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">
8539                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8540                         <field name="object_id" reporter:datatype="text"/>
8541                         <field name="grantable" reporter:datatype="bool"/>
8542                         <field name="id" reporter:datatype="id" />
8543                         <field name="perm" reporter:datatype="link"/>
8544                         <field name="usr" reporter:datatype="link"/>
8545                         <field name="object_type" reporter:datatype="text"/>
8546                 </fields>
8547                 <links>
8548                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8549                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8550                 </links>
8551         </class>
8552         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8553                 <fields oils_persist:primary="id" oils_persist:sequence="">
8554                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8555                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8556                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8557                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8558                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8559                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8560                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8561                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8562                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8563                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8564                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8565                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8566                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8567                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8568                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8569                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8570                 </fields>
8571                 <links>
8572                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8573                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8574                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8575                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8576                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8577                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8578                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8579                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8580                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8581                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8582                 </links>
8583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8584             <actions>
8585                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8586                     <context link="xact" jump="usr" field="home_ou"/>
8587                 </retrieve>
8588                         </actions>
8589                 </permacrud>
8590         </class>
8591         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8592                 oils_obj:fieldmapper="money::aged_payment" 
8593                 oils_persist:tablename="money.aged_payment" 
8594                 reporter:label="Payments: Aged">
8595                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8596                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8597                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8598                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8599                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8600                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8601                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8602                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8603                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8604                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8605                         <field name="billing" reporter:datatype="link"/>
8606                 </fields>
8607                 <links>
8608                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8609                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8610                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8611                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8612                 </links>
8613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8614                         <actions>
8615                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8616                                         <context link="xact" field="usr_home_ou"/>
8617                                 </retrieve>
8618                         </actions>
8619                 </permacrud>
8620         </class>
8621         <class id="mallp" controller="open-ils.cstore" 
8622                 oils_obj:fieldmapper="money::all_payments" 
8623                 oils_persist:tablename="money.all_payments" 
8624                 oils_persist="readonly" reporter:core="true"
8625                 reporter:label="Payments: All">
8626                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8627                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8628                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8629                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8630                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8631                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8632                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8633                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8634                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8635                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8636                         <field name="billing" reporter:datatype="link"/>
8637                 </fields>
8638                 <links>
8639                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8640                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8641                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8642                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8643                 </links>
8644         </class>
8645
8646         <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">
8647                 <fields oils_persist:primary="id" oils_persist:sequence="">
8648                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8649                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8650                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8651                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8652                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8653                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8654                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8655                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8656                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8657                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8658                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8659                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8660                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8661                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8662                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8663                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8664                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8665                 </fields>
8666                 <links>
8667                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8668                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8669                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8670                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8671                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8672                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8673                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8674                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8675                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8676                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8677                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8678                 </links>
8679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8680                         <actions>
8681                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8682                                         <context link="xact" jump="usr" field="home_ou"/>
8683                                 </retrieve>
8684                         </actions>
8685                 </permacrud>
8686         </class>
8687         <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">
8688                 <fields oils_persist:primary="id" oils_persist:sequence="">
8689                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8690                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8691                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8692                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8693                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8694                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8695                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8696                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8697                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8698                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8699                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8700                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8701                 </fields>
8702                 <links>
8703                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8704                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8705                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8706                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8707                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8708                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8709                 </links>
8710         </class>
8711         <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">
8712                 <fields oils_persist:primary="id" oils_persist:sequence="">
8713                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8714                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8715                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8716                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8717                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8718                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8719                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8720                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8721                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8722                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8723                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8724                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8725                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8726                 </fields>
8727                 <links>
8728                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8729                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8730                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8731                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8732                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8733                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8734                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8735                 </links>
8736         </class>
8737         <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">
8738                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8739                         <field name="bucket" reporter:datatype="link"/>
8740                         <field name="id" reporter:datatype="id" />
8741                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8742                         <field name="create_time" reporter:datatype="timestamp" />
8743                         <field name="pos" reporter:datatype="int" />
8744                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8745                 </fields>
8746                 <links>
8747                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8748                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8749             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8750                 </links>
8751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8752                         <actions>
8753                                 <retrieve permission="ADMIN_COPY_BUCKET">
8754                     <context link="bucket" owning_lib="owning_lib"/>
8755                 </retrieve>
8756             </actions>
8757         </permacrud>
8758         </class>
8759         <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">
8760                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8761                         <field name="id" reporter:datatype="id" />
8762                         <field name="item" reporter:datatype="link"/>
8763                         <field name="note" reporter:datatype="text" />
8764                 </fields>
8765                 <links>
8766                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8767                 </links>
8768         </class>
8769         <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">
8770                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8771                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8772                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8773                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8774                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8775                 </fields>
8776                 <links>
8777                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8778                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8779                 </links>
8780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8781                         <actions>
8782                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8783                         </actions>
8784                 </permacrud>
8785         </class>
8786     <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">
8787         <fields oils_persist:primary="field">
8788             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8789             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8790             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8791         </fields>
8792         <links/>
8793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8794             <actions>
8795                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8796                 <retrieve />
8797                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8798                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8799             </actions>
8800         </permacrud>
8801     </class>
8802         <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">
8803                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8804                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8805                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8806                 </fields>
8807                 <links/>
8808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8809             <actions>
8810                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8811                 <retrieve/>
8812                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8813                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8814             </actions>
8815         </permacrud>
8816         </class>
8817
8818
8819         <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">
8820                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8821                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8822                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8823                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8824                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8825                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8826                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8827                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8828                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8829                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8830                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8831                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8832                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8833                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8834                 </fields>
8835                 <links>
8836                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8837                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8838                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8839                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8840                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8841                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8842                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8843                 </links>
8844         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8845             <actions>
8846                 <create permission="TRANSIT_COPY">
8847                     <context link="target_copy" field="owner"/>
8848                 </create>
8849                 <retrieve/>
8850                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8851                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8852             </actions>
8853         </permacrud>
8854         </class>
8855         <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">
8856                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8857                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8858                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8859                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8860                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8861                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8862                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8863                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8864                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8865                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8866                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8867                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8868                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8869                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8870                 </fields>
8871                 <links>
8872                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8873                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8874                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8875                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8876                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8877                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8878                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8879                 </links>
8880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8881             <actions>
8882                 <create permission="TRANSIT_COPY" context_field="owner">
8883                     <context link="target_copy" field="circ_lib"/>
8884                 </create>
8885                 <retrieve/>
8886                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8887                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8888             </actions>
8889         </permacrud>
8890         </class>
8891         <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">
8892                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8893                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8894                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8895                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8896                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8897                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8898                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8899                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8900                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8901                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8902                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8903                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8904                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8905                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8906                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8907                 </fields>
8908                 <links>
8909                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8910                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8911                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8912                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8913                 </links>
8914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8915             <actions>
8916                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8917                     <context link="xact" jump="usr" field="home_ou"/>
8918                 </retrieve>
8919                         </actions>
8920                 </permacrud>
8921         </class>
8922         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8923                 oils_obj:fieldmapper="money::aged_billing" 
8924                 oils_persist:tablename="money.aged_billing" 
8925                 reporter:label="Aged Billing Line Item">
8926                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8927                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8928                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8929                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8930                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8931                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8932                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8933                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8934                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8935                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8936                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8937                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8938                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8939                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8940                 </fields>
8941                 <links>
8942                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8943                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8944                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8945                 </links>
8946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8947                         <actions>
8948                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8949                                         <context link="xact" field="usr_home_ou"/>
8950                                 </retrieve>
8951                         </actions>
8952                 </permacrud>
8953         </class>
8954         <class id="mallb" controller="open-ils.cstore" 
8955                 oils_obj:fieldmapper="money::all_billings" 
8956                 oils_persist:tablename="money.all_billings" 
8957                 oils_persist="readonly" reporter:label="All Billing Line Items">
8958                 <fields oils_persist:primary="id" oils_persist:sequence="">
8959                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8960                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8961                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8962                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8963                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8964                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8965                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8966                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8967                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8968                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8969                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8970                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8971                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8972                 </fields>
8973                 <links>
8974                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8975                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8976                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8977                 </links>
8978         </class>
8979         <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">
8980                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8981                         <field name="grp" />
8982                         <field name="id" reporter:datatype="id" />
8983                         <field name="usr" />
8984                 </fields>
8985                 <links>
8986                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8987                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8988                 </links>
8989         </class>
8990         <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">
8991                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8992                         <field name="id" reporter:datatype="id" />
8993                         <field name="fq_field" reporter:datatype="text"/>
8994                         <field name="identity_value" reporter:datatype="text"/>
8995                         <field name="translation" reporter:datatype="text"/>
8996                         <field name="string" reporter:datatype="text"/>
8997                 </fields>
8998                 <links>
8999                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
9000                 </links>
9001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9002             <actions>
9003                 <create permission="CREATE_TRANSLATION" global_required="true"/>
9004                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
9005                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
9006                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
9007             </actions>
9008         </permacrud>
9009         </class>
9010         <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">
9011                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
9012                         <field name="id" reporter:datatype="id" />
9013                         <field name="fm_class" reporter:datatype="text"/>
9014                         <field name="field" reporter:datatype="text"/>
9015                         <field name="owner" reporter:datatype="org_unit"/>
9016                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
9017                 </fields>
9018                 <links>
9019                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9020                 </links>
9021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9022             <actions>
9023                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9024                 <retrieve/>
9025                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9026                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9027             </actions>
9028         </permacrud>
9029         </class>
9030         <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">
9031                 <fields oils_persist:primary="code">
9032                         <field name="code" reporter:datatype="id" />
9033                         <field name="marc_code" reporter:datatype="text"/>
9034                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
9035                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9036                         <field name="rtl" reporter:datatype="bool"/>
9037                 </fields>
9038                 <links/>
9039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9040             <actions>
9041                 <create permission="CREATE_LOCALE" global_required="true"/>
9042                 <retrieve/>
9043                 <update permission="UPDATE_LOCALE" global_required="true"/>
9044                 <delete permission="DELETE_LOCALE" global_required="true"/>
9045             </actions>
9046         </permacrud>
9047         </class>
9048         <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">
9049                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
9050                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
9051                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
9052                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
9053                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
9054                 </fields>
9055                 <links>
9056                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9057                 </links>
9058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9059             <actions>
9060                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
9061                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
9062                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
9063                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
9064             </actions>
9065         </permacrud>
9066         </class>
9067
9068         <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">
9069                 <fields oils_persist:primary="id">
9070                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9071                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9072                 </fields>
9073                 <links/>
9074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9075             <actions>
9076                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9077                 <retrieve/>
9078                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9079                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9080             </actions>
9081         </permacrud>
9082         </class>
9083
9084         <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">
9085                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
9086                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9087                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9088                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9089                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9090                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9091                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9092                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9093                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9094                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9095                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9096                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9097                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9098                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9099                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9100                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9101                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9102                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9103                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9104                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9105                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9106                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9107                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9108                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9109                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9110                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9111                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9112                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9113                 </fields>
9114                 <links>
9115                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9116                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9117                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9118                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9119                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9120                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9121                 </links>
9122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9123             <actions>
9124                 <create permission="user_request.create">
9125                     <context link="usr" field="home_ou"/>
9126                                 </create>
9127                 <retrieve permission="user_request.view">
9128                     <context link="usr" field="home_ou"/>
9129                                 </retrieve>
9130                 <update permission="user_request.update">
9131                     <context link="usr" field="home_ou"/>
9132                                 </update>
9133                 <delete permission="user_request.delete">
9134                     <context link="usr" field="home_ou"/>
9135                                 </delete>
9136             </actions>
9137         </permacrud>
9138         </class>
9139
9140         <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">
9141         <oils_persist:source_definition><![CDATA[
9142             SELECT r.*, CASE
9143                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
9144                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
9145                         WHEN l.state = 'received' THEN 5 -- Received
9146                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
9147                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
9148                         WHEN l.id IS NOT NULL THEN 2 -- Pending
9149                         WHEN l.id IS NULL THEN 1 -- New
9150                         ELSE 0 -- Error
9151                     END AS request_status
9152                     ,u.home_ou
9153             FROM      acq.user_request r
9154             JOIN actor.usr u ON (r.usr = u.id)
9155             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
9156             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
9157             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
9158         ]]></oils_persist:source_definition>
9159                 <fields oils_persist:primary="id">
9160                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9161                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9162                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9163                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9164                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9165                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9166                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9167                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9168                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9169                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9170                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9171                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9172                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9173                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9174                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9175                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9176                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9177                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9178                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9179                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9180                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9181                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9182                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9183                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9184                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9185                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9186                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9187                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
9188                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
9189                 </fields>
9190                 <links>
9191                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9192                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9193                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9194                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9195                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9196                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9197                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
9198                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9199                 </links>
9200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9201             <actions>
9202                 <retrieve permission="user_request.view">
9203                     <context link="usr" field="home_ou"/>
9204                                 </retrieve>
9205             </actions>
9206         </permacrud>
9207         </class>
9208
9209         <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">
9210                 <fields oils_persist:primary="id">
9211                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9212                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9213                 </fields>
9214                 <links/>
9215         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9216             <actions>
9217                 <retrieve/>
9218             </actions>
9219         </permacrud>
9220         </class>
9221
9222         <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">
9223                 <fields oils_persist:primary="code">
9224                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
9225                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9226                 </fields>
9227                 <links/>
9228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9229             <actions>
9230                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9231                 <retrieve/>
9232                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9233                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9234             </actions>
9235         </permacrud>
9236         </class>
9237
9238         <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">
9239                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
9240                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
9241                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
9242                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
9243                         <field reporter:label="Ratio" name="ratio" />
9244                 </fields>
9245                 <links>
9246                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
9247                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
9248                 </links>
9249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9250                         <actions>
9251                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9252                                 <retrieve/>
9253                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9254                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9255                         </actions>
9256                 </permacrud>
9257         </class>
9258
9259         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
9260                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
9261                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9262                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9263                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
9264                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
9265                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
9266                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
9267                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
9268                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
9269                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
9270                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9271                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9272                         <field reporter:label="URL" name="url" reporter:datatype="text" />
9273                         <field reporter:label="Email" name="email" reporter:datatype="text" />
9274                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
9275                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
9276                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
9277                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
9278                         <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
9279                         <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
9280                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
9281                         <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
9282                         <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9283                         <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
9284                 </fields>
9285                 <links>
9286                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9287                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9288                         <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
9289                         <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
9290                         <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
9291                         <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
9292                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
9293                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
9294                         <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
9295                         <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
9296                         <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
9297                 </links>
9298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9299             <actions>
9300                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
9301                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
9302                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
9303                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
9304             </actions>
9305         </permacrud>
9306         </class>
9307
9308         <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">
9309                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
9310                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9311                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9312                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9313                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9314                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9315                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9316                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9317                 </fields>
9318                 <links>
9319                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9320                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9321                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9322                 </links>
9323         </class>
9324
9325         <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">
9326                 <fields oils_persist:primary="code">
9327                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
9328                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9329                 </fields>
9330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9331             <actions>
9332                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9333                 <retrieve/>
9334                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9335                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9336             </actions>
9337                 </permacrud>
9338         </class>
9339
9340         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
9341                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
9342                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
9343                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
9344                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9345                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
9346                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
9347                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
9348                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
9349                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
9350                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
9351                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
9352                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9353                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
9354                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
9355                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
9356                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
9357                 </fields>
9358                 <links>
9359                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
9360                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9361                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
9362                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
9363                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
9364                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
9365                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
9366                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
9367                 </links>
9368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9369             <actions>
9370                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
9371                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
9372                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
9373                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
9374             </actions>
9375         </permacrud>
9376         </class>
9377
9378         <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">
9379                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
9380                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9381                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9382                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9383                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
9384                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
9385                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
9386                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9387                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
9388                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9389                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9390                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9391                 </fields>
9392                 <links>
9393                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9394                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9395                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9396                 </links>
9397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9398             <actions>
9399                 <create   permission="ADMIN_INVOICE">
9400                                         <context link="invoice" field="receiver"/>
9401                                 </create>
9402                 <retrieve permission="ADMIN_INVOICE">
9403                                         <context link="invoice" field="receiver"/>
9404                                 </retrieve>
9405                 <update   permission="ADMIN_INVOICE">
9406                                         <context link="invoice" field="receiver"/>
9407                                 </update>
9408                                 <delete   permission="ADMIN_INVOICE">
9409                                         <context link="invoice" field="receiver"/>
9410                                 </delete>
9411             </actions>
9412         </permacrud>
9413         </class>
9414
9415         <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">
9416                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
9417                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9418                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9419                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9420                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9421                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
9422                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
9423                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9424                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9425                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9426                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9427                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9428                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9429                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
9430                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9431                 </fields>
9432                 <links>
9433                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9434                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9435                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9436                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9437                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9438                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
9439                 </links>
9440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9441             <actions>
9442                 <create   permission="ADMIN_INVOICE">
9443                                         <context link="invoice" field="receiver"/>
9444                                 </create>
9445                 <retrieve permission="ADMIN_INVOICE">
9446                                         <context link="invoice" field="receiver"/>
9447                                 </retrieve>
9448                 <update   permission="ADMIN_INVOICE">
9449                                         <context link="invoice" field="receiver"/>
9450                                 </update>
9451                                 <delete   permission="ADMIN_INVOICE">
9452                                         <context link="invoice" field="receiver"/>
9453                                 </delete>
9454             </actions>
9455         </permacrud>
9456         </class>
9457
9458         <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">
9459                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
9460                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
9461                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9462                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9463                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9464                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9465                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9466                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text" oils_obj:required="true"/>
9467                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9468                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9469                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
9470                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
9471                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9472                 </fields>
9473                 <links>
9474                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9475                 </links>
9476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9477             <actions>
9478                 <create permission="ADMIN_PROVIDER">
9479                     <context link="provider" field="owner"/>
9480                 </create>
9481                 <retrieve permission="ADMIN_PROVIDER">
9482                     <context link="provider" field="owner"/>
9483                 </retrieve>
9484                 <update permission="ADMIN_PROVIDER">
9485                     <context link="provider" field="owner"/>
9486                 </update>
9487                 <delete permission="ADMIN_PROVIDER">
9488                     <context link="provider" field="owner"/>
9489                 </delete>
9490             </actions>
9491         </permacrud>
9492         </class>
9493
9494         <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">
9495                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9496                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9497                         <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
9498                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9499                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9500                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9501                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9502                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
9503         </fields>
9504                 <links>
9505                         <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
9506                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9507                 </links>
9508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9509             <actions>
9510                 <create permission="ADMIN_PROVIDER">
9511                     <context link="provider" field="owner"/>
9512                 </create>
9513                 <retrieve permission="ADMIN_PROVIDER">
9514                     <context link="provider" field="owner"/>
9515                 </retrieve>
9516                 <update permission="ADMIN_PROVIDER">
9517                     <context link="provider" field="owner"/>
9518                 </update>
9519                 <delete permission="ADMIN_PROVIDER">
9520                     <context link="provider" field="owner"/>
9521                 </delete>
9522             </actions>
9523         </permacrud>
9524     </class>
9525         <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">
9526                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9527                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9528                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9529                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9530                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9531                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9532                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
9533                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9534                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9535                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9536                         <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
9537                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9538                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9539                 </fields>
9540                 <links>
9541                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9542                 </links>
9543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9544             <actions>
9545                 <create permission="ADMIN_PROVIDER">
9546                     <context link="contact" jump='provider' field="owner"/>
9547                 </create>
9548                 <retrieve permission="ADMIN_PROVIDER">
9549                     <context link="contact" jump='provider' field="owner"/>
9550                 </retrieve>
9551                 <update permission="ADMIN_PROVIDER">
9552                     <context link="contact" jump='provider' field="owner"/>
9553                 </update>
9554                 <delete permission="ADMIN_PROVIDER">
9555                     <context link="contact" jump='provider' field="owner"/>
9556                 </delete>
9557             </actions>
9558         </permacrud>
9559         </class>
9560
9561         <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">
9562                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9563                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9564                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9565                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9566                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9567                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9568                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9569                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9570                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9571                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9572                 </fields>
9573                 <links>
9574                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9575                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9576                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9577                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9578                 </links>
9579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9580             <actions>
9581                 <create permission="ADMIN_ACQ_FUND">
9582                     <context link="src_fund" field="org"/>
9583                 </create>
9584                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9585                     <context link="src_fund" field="org"/>
9586                     <context link="dest_fund" field="org"/>
9587                 </retrieve>
9588                 <update permission="ADMIN_ACQ_FUND">
9589                     <context link="src_fund" field="org"/>
9590                 </update>
9591                 <delete permission="ADMIN_ACQ_FUND">
9592                     <context link="src_fund" field="org"/>
9593                 </delete>
9594             </actions>
9595         </permacrud>
9596         </class>
9597
9598         <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">
9599                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9600                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9601                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9602                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9603                 </fields>
9604                 <links>
9605             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9606                 </links>
9607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9608                         <actions>
9609                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9610                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9611                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9612                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9613                         </actions>
9614                 </permacrud>
9615         </class>
9616
9617         <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">
9618                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9619                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9620                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9621                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9622                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9623                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9624                 </fields>
9625                 <links>
9626                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9627                 </links>
9628                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9629                         <actions>
9630                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9631                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9632                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9633                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9634                         </actions>
9635                 </permacrud>
9636         </class>
9637
9638         <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">
9639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9640                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9641                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
9642                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true" />
9643                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true" />
9644                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9645                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true" />
9646                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9647                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9648                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9649                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9650                 </fields>
9651                 <links>
9652                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9653                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9654             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9655             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9656                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9657                 </links>
9658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9659             <actions>
9660                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9661                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9662                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9663                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9664             </actions>
9665         </permacrud>
9666         </class>
9667
9668         <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">
9669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9670                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9671                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9672                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9673                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9674                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9675                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9676                 </fields>
9677                 <links>
9678                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9679                 </links>
9680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9681                         <actions>
9682                                 <create permission="ADMIN_FUNDING_SOURCE">
9683                     <context link="funding_source" field="owner"/>
9684                 </create>
9685                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9686                     <context link="funding_source" field="owner"/>
9687                 </retrieve>
9688                                 <update permission="ADMIN_FUNDING_SOURCE">
9689                     <context link="funding_source" field="owner"/>
9690                 </update>
9691                                 <delete permission="ADMIN_FUNDING_SOURCE">
9692                     <context link="funding_source" field="owner"/>
9693                 </delete>
9694                         </actions>
9695                 </permacrud>
9696         </class>
9697
9698         <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">
9699                 <fields oils_persist:primary="id">
9700                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9701                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9702                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9703                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9704                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9705                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9706                 </fields>
9707                 <links>
9708                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9709                 </links>
9710         </class>
9711
9712         <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">
9713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9714                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9715                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9716                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9717                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9718                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9719                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9720                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9721                         <field reporter:label="Debit Time" name="create_time" reporter:datatype="timestamp" />
9722                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9723                         <field reporter:label="Invoice Items" name="invoice_items" reporter:datatype="link" oils_persist:virtual="true"/>
9724                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9725                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9726                 </fields>
9727                 <links>
9728                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9729                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9730                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9731                         <link field="invoice_items" reltype="has_many" key="fund_debit" map="" class="acqii"/>
9732                         <link field="po_items" reltype="has_many" key="fund_debit" map="" class="acqpoi"/>
9733                         <link field="lineitem_details" reltype="has_many" key="fund_debit" map="" class="acqlid"/>
9734                 </links>
9735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9736                         <actions>
9737                                 <create permission="ADMIN_ACQ_FUND">
9738                     <context link="fund" field="org"/>
9739                 </create>
9740                                 <retrieve permission="ADMIN_ACQ_FUND">
9741                     <context link="fund" field="org"/>
9742                 </retrieve>
9743                                 <update permission="ADMIN_ACQ_FUND">
9744                     <context link="fund" field="org"/>
9745                 </update>
9746                                 <delete permission="ADMIN_ACQ_FUND">
9747                     <context link="fund" field="org"/>
9748                 </delete>
9749                         </actions>
9750                 </permacrud>
9751         </class>
9752
9753         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9754                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9755                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9756                         <field reporter:label="Owner" name="org" reporter:datatype="org_unit" oils_obj:required="true" />
9757                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
9758                         <field reporter:label="Year" name="year" reporter:datatype="int" oils_obj:required="true" />
9759                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" oils_obj:required="true" />
9760                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9761                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9762                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9763                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9764                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9765                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9766                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9767                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9768                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9769                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9770                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9771                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9772                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9773                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9774                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9775                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9776                 </fields>
9777                 <links>
9778                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9779                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9780             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9781             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9782             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9783             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9784             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9785             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9786             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9787             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9788             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9789                 </links>
9790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9791             <actions>
9792                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9793                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9794                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9795                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9796             </actions>
9797         </permacrud>
9798         </class>
9799
9800         <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">
9801                 <fields oils_persist:primary="fund">
9802                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9803                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9804                 </fields>
9805                 <links>
9806                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9807                 </links>
9808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9809             <actions>
9810                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9811                                         <context link="fund" field="org" />
9812                 </retrieve>
9813             </actions>
9814         </permacrud>
9815         </class>
9816
9817         <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">
9818                 <fields oils_persist:primary="fund">
9819                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9820                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9821                 </fields>
9822                 <links>
9823                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9824                 </links>
9825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9826             <actions>
9827                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9828                                         <context link="fund" field="org" />
9829                 </retrieve>
9830             </actions>
9831         </permacrud>
9832         </class>
9833
9834         <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">
9835                 <fields oils_persist:primary="fund">
9836                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9837                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9838                 </fields>
9839                 <links>
9840                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9841                 </links>
9842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9843             <actions>
9844                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9845                                         <context link="fund" field="org" />
9846                 </retrieve>
9847             </actions>
9848         </permacrud>
9849         </class>
9850
9851         <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">
9852                 <fields oils_persist:primary="fund">
9853                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9854                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9855                 </fields>
9856                 <links>
9857                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9858                 </links>
9859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9860             <actions>
9861                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9862                                         <context link="fund" field="org" />
9863                 </retrieve>
9864             </actions>
9865         </permacrud>
9866         </class>
9867
9868         <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">
9869                 <fields oils_persist:primary="fund">
9870                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9871                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9872                 </fields>
9873                 <links>
9874                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9875                 </links>
9876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9877             <actions>
9878                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9879                                         <context link="fund" field="org" />
9880                 </retrieve>
9881             </actions>
9882         </permacrud>
9883         </class>
9884
9885    <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">
9886         <fields oils_persist:primary="fund">
9887             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9888             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9889         </fields>
9890         <links>
9891             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9892         </links>
9893     </class>
9894
9895    <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">
9896         <fields oils_persist:primary="fund">
9897             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9898             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9899         </fields>
9900         <links>
9901             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9902         </links>
9903     </class>
9904
9905    <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">
9906         <fields oils_persist:primary="fund">
9907             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9908             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9909         </fields>
9910         <links>
9911             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9912         </links>
9913     </class>
9914
9915    <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">
9916         <fields oils_persist:primary="fund">
9917             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9918             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9919         </fields>
9920         <links>
9921             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9922         </links>
9923     </class>
9924
9925    <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">
9926         <fields oils_persist:primary="fund">
9927             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9928             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9929         </fields>
9930         <links>
9931             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9932         </links>
9933     </class>
9934
9935         <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">
9936                 <fields oils_persist:primary="funding_source">
9937                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9938                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9939                 </fields>
9940                 <links>
9941                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9942                 </links>
9943         </class>
9944
9945         <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">
9946                 <fields oils_persist:primary="funding_source">
9947                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9948                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9949                 </fields>
9950                 <links>
9951                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9952                 </links>
9953         </class>
9954
9955         <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">
9956                 <fields oils_persist:primary="funding_source">
9957                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9958                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9959                 </fields>
9960                 <links>
9961                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9962                 </links>
9963         </class>
9964
9965         <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">
9966                 <fields oils_persist:primary="fund">
9967                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9968                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9969                 </fields>
9970                 <links>
9971                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9972                 </links>
9973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9974             <actions>
9975                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9976                                         <context link="fund" field="org" />
9977                 </retrieve>
9978             </actions>
9979         </permacrud>
9980     </class>
9981     <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">
9982         <oils_persist:source_definition><![CDATA[
9983             SELECT
9984                 acqf.*,
9985                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9986                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9987                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9988                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9989             FROM
9990                 acq.fund acqf
9991                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9992                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9993                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9994                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9995         ]]></oils_persist:source_definition>
9996         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9997             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9998             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
9999             <field reporter:label="Name" name="name" reporter:datatype="text" />
10000             <field reporter:label="Year" name="year" reporter:datatype="int" />
10001             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
10002             <field reporter:label="Code" name="code" reporter:datatype="text" />
10003             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
10004             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
10005             <field reporter:label="Active" name="active" reporter:datatype="bool" />
10006             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
10007             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
10008
10009             <!-- non fund-native fields -->
10010             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
10011             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
10012             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
10013             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
10014         </fields>
10015         <links>
10016             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
10017             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10018             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
10019         </links>
10020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10021             <actions>
10022                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
10023             </actions>
10024         </permacrud>
10025         </class>
10026         <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">
10027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
10028                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
10029                         <field reporter:label="Fund" name="fund" reporter:datatype="link" oils_obj:required="true" />
10030                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
10031                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
10032                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" oils_obj:required="true" />
10033                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10034                         <field reporter:label="Allocation Time" name="create_time" reporter:datatype="timestamp" />
10035                 </fields>
10036                 <links>
10037                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
10038                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10039                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
10040                 </links>
10041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10042                         <actions>
10043                                 <create permission="ADMIN_ACQ_FUND">
10044                     <context link="fund" field="org"/>
10045                 </create>
10046                                 <retrieve permission="ADMIN_ACQ_FUND">
10047                     <context link="fund" field="org"/>
10048                 </retrieve>
10049                                 <update permission="ADMIN_ACQ_FUND">
10050                     <context link="fund" field="org"/>
10051                 </update>
10052                                 <delete permission="ADMIN_ACQ_FUND">
10053                     <context link="fund" field="org"/>
10054                 </delete>
10055                         </actions>
10056                 </permacrud>
10057         </class>
10058
10059     <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">
10060         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
10061             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
10062             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
10063             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
10064             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
10065             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
10066             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
10067             <field reporter:label="Note" name="note" reporter:datatype="text" />
10068             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
10069         </fields>
10070         <links>
10071             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
10072             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10073             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
10074         </links>
10075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10076                         <actions>
10077                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10078                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10079                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10080                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10081                         </actions>
10082                 </permacrud>
10083     </class>
10084
10085         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
10086                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
10087                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
10088                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10089                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
10090                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
10091                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10092                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10093                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
10094                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
10095                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10096                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10097                 </fields>
10098                 <links>
10099                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10100                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10101                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10102                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10103                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
10104                 </links>
10105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10106                         <actions>
10107                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
10108                         </actions>
10109                 </permacrud>
10110         </class>
10111
10112         <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">
10113                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
10114                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
10115                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
10116                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10117                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
10118                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
10119                 </fields>
10120                 <links>
10121                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10122                 </links>
10123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10124                         <actions>
10125                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10126                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
10127                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10128                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10129                         </actions>
10130                 </permacrud>
10131         </class>
10132
10133         <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">
10134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
10135                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
10136                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10137                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10138                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10139                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10140                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10141                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
10142                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10143                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10144                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
10145                         <field reporter:label="Name" name="name" reporter:datatype="text" />
10146                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10147                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10148                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
10149                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
10150                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
10151                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
10152                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
10153                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
10154                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
10155                 </fields>
10156                 <links>
10157                         <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
10158                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10159                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10160                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10161                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
10162                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10163                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
10164                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
10165                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
10166                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10167                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10168                 </links>
10169                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10170                         <actions>
10171                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10172                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10173                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10174                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10175                         </actions>
10176                 </permacrud>
10177         </class>
10178
10179         <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">
10180                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
10181                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10182                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10183                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10184                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10185                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10186                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10187                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10188                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10189                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10190                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10191                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10192                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10193                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
10194                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10195                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10196                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10197                 </fields>
10198                 <links>
10199                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10200                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10201                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10202                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10203                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10204                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10205                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10206                 </links>
10207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10208             <actions>
10209                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10210             </actions>
10211                 </permacrud>
10212         </class>
10213
10214         <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">
10215                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
10216                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
10217                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10218                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10219                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10220                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10221                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10222                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
10223                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10224                 </fields>
10225                 <links>
10226                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10227                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10228                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10229                 </links>
10230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10231             <actions>
10232                 <create permission="CREATE_PURCHASE_ORDER">
10233                     <context link="purchase_order" field="ordering_agency"/>
10234                 </create>
10235                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10236                     <context link="purchase_order" field="ordering_agency"/>
10237                 </retrieve>
10238                 <update permission="CREATE_PURCHASE_ORDER">
10239                     <context link="purchase_order" field="ordering_agency"/>
10240                 </update>
10241                 <delete permission="CREATE_PURCHASE_ORDER">
10242                     <context link="purchase_order" field="ordering_agency"/>
10243                 </delete>
10244             </actions>
10245                 </permacrud>
10246         </class>
10247
10248         <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">
10249                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
10250                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10251                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10252                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10253                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
10254                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
10255                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
10256                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10257                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
10258                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10259                         <field reporter:label="Target" name="target" reporter:datatype="int" />
10260                 </fields>
10261                 <links>
10262                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10263                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10264                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
10265                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10266                 </links>
10267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10268             <actions>
10269                 <create permission="CREATE_PURCHASE_ORDER">
10270                     <context link="purchase_order" field="ordering_agency"/>
10271                 </create>
10272                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10273                     <context link="purchase_order" field="ordering_agency"/>
10274                 </retrieve>
10275                 <update permission="CREATE_PURCHASE_ORDER">
10276                     <context link="purchase_order" field="ordering_agency"/>
10277                 </update>
10278                 <delete permission="CREATE_PURCHASE_ORDER">
10279                     <context link="purchase_order" field="ordering_agency"/>
10280                 </delete>
10281             </actions>
10282                 </permacrud>
10283         </class>
10284
10285         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
10286                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
10287                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
10288                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
10289                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
10290                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10291                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10292                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10293                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10294                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
10295                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
10296                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
10297                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
10298                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10299                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10300                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10301                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
10302                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10303                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10304                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10305                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
10306                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
10307                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
10308                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
10309                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
10310                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
10311                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
10312                 </fields>
10313                 <links>
10314                         <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
10315                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10316                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10317                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10318                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10319                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10320                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10321                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10322                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
10323                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
10324                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
10325                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10326                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
10327                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10328                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
10329                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
10330                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10331                 </links>
10332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10333                         <actions>
10334                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10335                                         <context link="purchase_order" field="ordering_agency"/>
10336                                         <context link="picklist" field="org_unit"/>
10337                                 </retrieve>
10338                         </actions>
10339                 </permacrud>
10340         </class>
10341
10342         <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">
10343                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
10344                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10345                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10346                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10347                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
10348                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10349                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10350                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
10351                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10352                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10353                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
10354                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
10355                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10356                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10357                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
10358                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
10359                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
10360                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10361                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
10362                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10363                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10364                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10365                 </fields>
10366                 <links>
10367                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
10368                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10369                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10370                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10371                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10372                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10373                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10374                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10375                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10376                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10377                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10378                 </links>
10379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10380                         <actions>
10381                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10382                                         <context link="purchase_order" field="ordering_agency"/>
10383                                         <context link="picklist" field="org_unit"/>
10384                                 </retrieve>
10385                         </actions>
10386                 </permacrud>
10387         </class>
10388
10389         <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">
10390                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
10391                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
10392                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10393                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10394                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10395                 </fields>
10396                 <links>
10397                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10398                 </links>
10399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10400                         <actions>
10401                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10402                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
10403                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10404                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10405                         </actions>
10406                 </permacrud>
10407         </class>
10408
10409         <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">
10410                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
10411                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
10412                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
10413                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10414                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10415                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10416                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10417                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
10418                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
10419                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10420                 </fields>
10421                 <links>
10422                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10423                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10424                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10425                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
10426                 </links>
10427         </class>
10428
10429         <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">
10430                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
10431                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
10432                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
10433                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
10434                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
10435                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
10436                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
10437                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
10438                 </fields>
10439                 <links>
10440                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10441                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
10442                 </links>
10443         </class>
10444
10445         <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">
10446                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
10447                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
10448                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
10449                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
10450                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
10451                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
10452                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
10453                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
10454                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
10455                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
10456                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10457                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
10458                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
10459                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10460                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
10461                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10462                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
10463                 </fields>
10464                 <links>
10465                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10466                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
10467                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10468                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10469                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10470                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10471                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10472                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10473                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
10474                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
10475                 </links>
10476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10477             <actions>
10478                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10479                     <context link="lineitem" jump="purchase_order" field="ordering_agency"/>
10480                     <context link="lineitem" jump="picklist" field="org_unit"/>
10481                 </retrieve>
10482             </actions>
10483         </permacrud>
10484         </class>
10485
10486         <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">
10487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10488                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10489                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10490                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10491                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10492                 </fields>
10493                 <links/>
10494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10495                         <actions>
10496                                 <retrieve />
10497                         </actions>
10498                 </permacrud>
10499         </class>
10500
10501         <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">
10502                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10503                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10504                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10505                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10506                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10507                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10508             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10509                 </fields>
10510                 <links/>
10511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10512             <actions>
10513                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10514                 <retrieve />
10515                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10516                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10517             </actions>
10518         </permacrud>
10519         </class>
10520
10521         <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">
10522                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10523                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10524                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10525                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10526                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10527                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10528                 </fields>
10529                 <links/>
10530         </class>
10531         <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">
10532                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10533                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10534                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10535                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10536                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10537                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10538                 </fields>
10539                 <links>
10540                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10541                 </links>
10542         </class>
10543
10544         <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">
10545             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10546                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10547                 <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true" />
10548                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
10549                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
10550                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10551                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10552         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10553
10554             </fields>
10555             <links>
10556                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10557             </links>
10558             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10559                 <actions>
10560                     <create permission="ADMIN_PROVIDER">
10561                         <context link="provider" field="owner"/>
10562                     </create>
10563                     <retrieve permission="ADMIN_PROVIDER">
10564                         <context link="provider" field="owner"/>
10565                     </retrieve>
10566                     <update permission="ADMIN_PROVIDER">
10567                         <context link="provider" field="owner"/>
10568                     </update>
10569                     <delete permission="ADMIN_PROVIDER">
10570                         <context link="provider" field="owner"/>
10571                     </delete>
10572                 </actions>
10573             </permacrud>
10574         </class>
10575         
10576         <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">
10577             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10578                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10579                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10580                 <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
10581                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
10582             </fields>
10583             <links>
10584                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10585             </links>
10586             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10587                 <actions>
10588                     <create permission="ADMIN_PROVIDER">
10589                         <context link="provider" field="owner"/>
10590                     </create>
10591                     <retrieve permission="ADMIN_PROVIDER">
10592                         <context link="provider" field="owner"/>
10593                     </retrieve>
10594                     <update permission="ADMIN_PROVIDER">
10595                         <context link="provider" field="owner"/>
10596                     </update>
10597                     <delete permission="ADMIN_PROVIDER">
10598                         <context link="provider" field="owner"/>
10599                     </delete>
10600                 </actions>
10601             </permacrud>
10602         </class>
10603         
10604         <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">
10605             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10606                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10607                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10608                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10609                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10610                 </fields>
10611                 <links/>
10612         </class>
10613
10614         <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">
10615                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10616                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10617                         <field name="label"         reporter:datatype="text"      reporter:label="Label" oils_obj:required="true"/>
10618                         <field name="host"          reporter:datatype="text"      reporter:label="Host" oils_obj:required="true"/>
10619                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10620                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10621                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10622                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10623                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner" oils_obj:required="true"/>
10624                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10625                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider" oils_obj:required="true"/>
10626                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10627                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10628                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10629                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10630                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes" oils_obj:required="true"/>
10631                 </fields>
10632                 <links>
10633                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10634                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10635                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10636                 </links>
10637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10638             <actions>
10639                 <create permission="ADMIN_PROVIDER">
10640                     <context link="provider" field="owner"/>
10641                 </create>
10642                 <retrieve permission="ADMIN_PROVIDER">
10643                     <context link="provider" field="owner"/>
10644                 </retrieve>
10645                 <update permission="ADMIN_PROVIDER">
10646                     <context link="provider" field="owner"/>
10647                 </update>
10648                 <delete permission="ADMIN_PROVIDER">
10649                     <context link="provider" field="owner"/>
10650                 </delete>
10651             </actions>
10652         </permacrud>
10653         </class>
10654
10655         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10656                 oils_obj:fieldmapper="acq::edi_attr" 
10657                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10658                 <fields oils_persist:primary="key">
10659                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10660                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10661                 </fields>
10662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10663             <actions>
10664                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10665                 <retrieve/>
10666                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10667                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10668             </actions>
10669         </permacrud>
10670         </class>
10671         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10672                 oils_obj:fieldmapper="acq::edi_attr_set" 
10673                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10674                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10675                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10676                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10677                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10678                         <field name="edi_accounts" reporter:datatype="link" oils_persist:virtual="true" reporter:label="EDI Accounts"/>
10679                 </fields>
10680                 <links>
10681                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10682                         <link field="edi_accounts" reltype="has_many" key="attr_set" map="" class="acqedi"/>
10683                 </links>
10684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10685             <actions>
10686                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10687                 <retrieve/>
10688                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10689                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10690             </actions>
10691         </permacrud>
10692         </class>
10693         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10694                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10695                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10696                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10697                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10698                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10699                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10700                 </fields>
10701                 <links>
10702                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10703                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10704                 </links>
10705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10706             <actions>
10707                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10708                 <retrieve/>
10709                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10710                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10711             </actions>
10712         </permacrud>
10713         </class>
10714
10715
10716         <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">
10717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10718                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10719                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10720                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10721                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10722                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10723                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10724                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10725                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10726                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10727                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10728                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10729                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10730                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10731                 </fields>
10732                 <links>
10733                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10734                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10735                 </links>
10736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10737             <actions>
10738                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10739                     <context link="account" jump="provider" field="owner"/>
10740                 </retrieve>
10741                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10742                     <context link="account" jump="provider" field="owner"/>
10743                 </update>
10744                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10745                     <context link="account" jump="provider" field="owner"/>
10746                 </delete>
10747             </actions>
10748         </permacrud>
10749         </class>
10750
10751
10752         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10753                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10754                         <field name="id" reporter:datatype="id" />
10755                         <field name="parent" reporter:datatype="link"/>
10756                         <field name="owner" reporter:datatype="link"/>
10757                         <field name="create_time" reporter:datatype="timestamp"/>
10758                         <field name="name" reporter:datatype="text"/>
10759                         <field name="shared" reporter:datatype="bool"/>
10760                         <field name="share_with" reporter:datatype="link"/>
10761                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10762                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10763                 </fields>
10764                 <links>
10765                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10766                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10767                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10768                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10769                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10770                 </links>
10771         </class>
10772         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10773                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10774                         <field name="id" reporter:datatype="id" />
10775                         <field name="parent" reporter:datatype="link"/>
10776                         <field name="owner" reporter:datatype="link"/>
10777                         <field name="create_time" reporter:datatype="timestamp"/>
10778                         <field name="name" reporter:datatype="text"/>
10779                         <field name="shared" reporter:datatype="bool"/>
10780                         <field name="share_with" reporter:datatype="link"/>
10781                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10782                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10783                 </fields>
10784                 <links>
10785                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10786                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10787                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10788                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10789                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10790                 </links>
10791         </class>
10792         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10793                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10794                         <field name="id" reporter:datatype="id" />
10795                         <field name="parent" reporter:datatype="link"/>
10796                         <field name="owner" reporter:datatype="link"/>
10797                         <field name="create_time" reporter:datatype="timestamp"/>
10798                         <field name="name" reporter:datatype="text"/>
10799                         <field name="shared" reporter:datatype="bool"/>
10800                         <field name="share_with" reporter:datatype="link"/>
10801                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10802                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10803                 </fields>
10804                 <links>
10805                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10806                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10807                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10808                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10809                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10810                 </links>
10811         </class>
10812         <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">
10813                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10814                         <field name="id" reporter:datatype="id" />
10815                         <field name="owner" reporter:datatype="link"/>
10816                         <field name="create_time" reporter:datatype="timestamp"/>
10817                         <field name="name" reporter:datatype="text"/>
10818                         <field name="data" reporter:datatype="text"/>
10819                         <field name="folder" reporter:datatype="link"/>
10820                         <field name="description" reporter:datatype="text"/>
10821                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10822                 </fields>
10823                 <links>
10824                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10825                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10826                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10827                 </links>
10828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10829             <actions>
10830                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10831                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10832                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10833                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10834             </actions>
10835         </permacrud>
10836         </class>
10837         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10838                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10839                         <field name="id" reporter:datatype="id" />
10840                         <field name="owner" reporter:datatype="link"/>
10841                         <field name="create_time" reporter:datatype="timestamp"/>
10842                         <field name="template" reporter:datatype="link"/>
10843                         <field name="data" reporter:datatype="text"/>
10844                         <field name="folder" reporter:datatype="link"/>
10845                         <field name="recur" reporter:datatype="bool"/>
10846                         <field name="recurrence" reporter:datatype="interval"/>
10847                         <field name="name" reporter:datatype="text"/>
10848                         <field name="description" reporter:datatype="text"/>
10849                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10850                 </fields>
10851                 <links>
10852                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10853                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10854                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10855                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10856                 </links>
10857         </class>
10858         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10859                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10860                         <field name="id" reporter:datatype="id" />
10861                         <field name="runner" reporter:datatype="link"/>
10862                         <field name="start_time" reporter:datatype="timestamp"/>
10863                         <field name="complete_time" reporter:datatype="timestamp"/>
10864                         <field name="run_time" reporter:datatype="timestamp"/>
10865                         <field name="email" reporter:datatype="text"/>
10866                         <field name="excel_format" reporter:datatype="bool"/>
10867                         <field name="csv_format" reporter:datatype="bool"/>
10868                         <field name="html_format" reporter:datatype="bool"/>
10869                         <field name="error_code" reporter:datatype="int"/>
10870                         <field name="error_text" reporter:datatype="text"/>
10871                         <field name="report" reporter:datatype="link"/>
10872                         <field name="folder" reporter:datatype="link"/>
10873                         <field name="chart_pie" reporter:datatype="bool"/>
10874                         <field name="chart_bar" reporter:datatype="bool"/>
10875                         <field name="chart_line" reporter:datatype="bool"/>
10876                 </fields>
10877                 <links>
10878                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10879                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10880                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10881                 </links>
10882         </class>
10883         <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">
10884                 <fields oils_persist:primary="id">
10885                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10886                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10887                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10888                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10889                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10890                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10891                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10892                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10893                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10894                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10895                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10896                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10897                 </fields>
10898                 <links>
10899                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10900                 </links>
10901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10902                         <actions>
10903                                 <retrieve />
10904                         </actions>
10905                 </permacrud>
10906         </class>
10907         <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">
10908                 <fields oils_persist:primary="id">
10909                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10910                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10911                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10912                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10913                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10914                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10915                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10916                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10917                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10918                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10919                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10920                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10921                 </fields>
10922                 <links>
10923                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10924                 </links>
10925         </class>
10926         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10927                 <fields oils_persist:primary="id">
10928                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10929                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10930                         <field reporter:label="Fingerprint" name="fingerprint" />
10931                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10932                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10933                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10934                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10935                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10936                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10937                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10938                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10939                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10940                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10941                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10942                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10943                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10944                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10945                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10946                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10947                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10948                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10949                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10950                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10951                 </fields>
10952                 <links>
10953                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10954                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10955                 </links>
10956         </class>
10957         <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">
10958                 <fields oils_persist:primary="id">
10959                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10960                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10961                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10962                         <field reporter:label="Detailed Age Division" name="age_division" reporter:datatype="text"/>
10963                 </fields>
10964                 <links>
10965                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10966                 </links>
10967         </class>
10968         <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">
10969                 <fields oils_persist:primary="id">
10970                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10971                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10972                 </fields>
10973                 <links>
10974                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10975                 </links>
10976         </class>
10977         <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">
10978                 <fields oils_persist:primary="id">
10979                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10980                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10981                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10982                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10983                 </fields>
10984                 <links>
10985                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10986                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10987                 </links>
10988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10989                         <actions>
10990                                 <retrieve permission="VIEW_HOLD">
10991                                         <context link="id" field="pickup_lib"/>
10992                                 </retrieve>
10993                         </actions>
10994                 </permacrud>
10995         </class>
10996         <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">
10997                 <fields oils_persist:primary="xact">
10998                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10999                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
11000                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
11001                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
11002                 </fields>
11003                 <links>
11004                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
11005                 </links>
11006         </class>
11007         <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">
11008                 <fields oils_persist:primary="xact">
11009                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
11010                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
11011                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
11012                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
11013                 </fields>
11014                 <links>
11015                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
11016                 </links>
11017         </class>
11018         <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)">
11019                 <fields oils_persist:primary="id">
11020                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
11021                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
11022                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
11023                 </fields>
11024                 <links>
11025                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11026                 </links>
11027         </class>
11028         <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">
11029                 <fields oils_persist:primary="id">
11030                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
11031                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
11032                 </fields>
11033                 <links>
11034                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11035                 </links>
11036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11037                         <actions>
11038                                 <retrieve permission="STAFF_LOGIN">
11039                                         <context link="id" field="circ_lib"/>
11040                                 </retrieve>
11041                         </actions>
11042                 </permacrud>
11043         </class>
11044         <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">
11045                 <fields oils_persist:primary="bibid">
11046                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
11047                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
11048                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
11049                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
11050                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
11051                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
11052                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
11053                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
11054                 </fields>
11055                 <links>
11056                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
11057                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11058                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11059                 </links>
11060         </class>
11061         <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">
11062                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
11063                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
11064                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
11065                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
11066                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
11067                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
11068                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
11069                 </fields>
11070                 <links>
11071                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11072                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
11073                 </links>
11074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11075                         <actions>
11076                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11077                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11078                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11079                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11080                         </actions>
11081                 </permacrud>
11082         </class>
11083         <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">
11084                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
11085                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
11086                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
11087                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
11088                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11089                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11090                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
11091                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
11092                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
11093                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
11094                 </fields>
11095                 <links>
11096                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11097                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11098                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
11099                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11100                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
11101                 </links>
11102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11103                         <actions>
11104                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
11105                                         <context link="formula" field="owner"/>
11106                                 </create>
11107                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
11108                                         <context link="formula" field="owner"/>
11109                                 </retrieve>
11110                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
11111                                         <context link="formula" field="owner"/>
11112                                 </update>
11113                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
11114                                         <context link="formula" field="owner"/>
11115                                 </delete>
11116                         </actions>
11117                 </permacrud>
11118         </class>
11119
11120         <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">
11121                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
11122                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11123                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11124                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11125                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
11126                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11127                 </fields>
11128                 <links>
11129                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11130                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11131                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11132                 </links>
11133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11134                         <actions>
11135                                 <create permission="CREATE_PURCHASE_ORDER">
11136                                         <context link="formula" field="owner"/>
11137                 </create>
11138                                 <retrieve permission="CREATE_PURCHASE_ORDER">
11139                                         <context link="formula" field="owner"/>
11140                 </retrieve>
11141                                 <update permission="CREATE_PURCHASE_ORDER">
11142                                         <context link="formula" field="owner"/>
11143                 </update>
11144                                 <delete permission="CREATE_PURCHASE_ORDER">
11145                                         <context link="formula" field="owner"/>
11146                 </delete>
11147                         </actions>
11148                 </permacrud>
11149         </class>
11150
11151         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
11152                 <fields oils_persist:primary="id">
11153                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
11154                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
11155                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
11156                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
11157                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
11158                 </fields>
11159                 <links>
11160                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
11161                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
11162                 </links>
11163         </class>
11164
11165         <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">
11166                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
11167                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11168                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11169                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11170                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11171                 </fields>
11172                 <links>
11173                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11174                 </links>
11175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11176                         <actions>
11177                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11178                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11179                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11180                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11181                         </actions>
11182                 </permacrud>
11183         </class>
11184
11185         <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">
11186                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
11187                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11188                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11189                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11190                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11191                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
11192                 </fields>
11193                 <links>
11194                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11195                 </links>
11196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11197                         <actions>
11198                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11199                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11200                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11201                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11202                         </actions>
11203                 </permacrud>
11204         </class>
11205
11206         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
11207                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
11208                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11209                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11210                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11211                 </fields>
11212                 <links>
11213                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11214                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11215                 </links>
11216         </class>
11217
11218         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
11219                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
11220                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11221                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11222                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11223                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11224                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11225                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11226                 </fields>
11227                 <links>
11228                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11229                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
11230                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11231                 </links>
11232         </class>
11233
11234         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
11235                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
11236                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11237                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11238                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
11239                 </fields>
11240                 <links>
11241                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11242                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
11243                 </links>
11244         </class>
11245
11246         <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">
11247                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
11248                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11249                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11250                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11251                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11252                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11253                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11254                 </fields>
11255                 <links>
11256                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11257                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
11258                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11259                 </links>
11260         </class>
11261
11262         <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">
11263                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
11264                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
11265                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11266                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
11267                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11268                 </fields>
11269                 <links>
11270                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11271                 </links>
11272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11273             <actions>
11274                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11275                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
11276                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11277                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11278             </actions>
11279                 </permacrud>
11280         </class>
11281
11282         <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">
11283                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
11284                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
11285                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
11286                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
11287                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
11288                 </fields>
11289                 <links>
11290                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
11291                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
11292                 </links>
11293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11294                         <actions>
11295                                 <create permission="ADMIN_CLAIM_POLICY">
11296                                         <context link="claim_policy" field="org_unit"/>
11297                 </create>
11298                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
11299                                         <context link="claim_policy" field="org_unit"/>
11300                 </retrieve>
11301                                 <update permission="ADMIN_CLAIM_POLICY">
11302                                         <context link="claim_policy" field="org_unit"/>
11303                 </update>
11304                                 <delete permission="ADMIN_CLAIM_POLICY">
11305                                         <context link="claim_policy" field="org_unit"/>
11306                 </delete>
11307                         </actions>
11308                 </permacrud>
11309         </class>
11310
11311     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
11312         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
11313             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11314             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
11315             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11316             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
11317             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
11318             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
11319             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
11320             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
11321             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
11322             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
11323             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
11324             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
11325             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
11326             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
11327             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11328             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
11329                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
11330                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
11331                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
11332         </fields>
11333         <links>
11334             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
11335             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11336         </links>
11337     </class>
11338
11339     <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">
11340         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
11341             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11342             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11343             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11344             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11345             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11346         </fields>
11347     </class>
11348
11349     <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">
11350         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11351             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11352             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11353             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11354             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11355             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11356             <field reporter:label="City" name="city" reporter:datatype="text"/>
11357             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11358             <field reporter:label="State" name="state" reporter:datatype="text"/>
11359             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11360             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11361             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11362         </fields>
11363     </class>
11364
11365     <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">
11366         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11367             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11368             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11369             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11370             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11371             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11372             <field reporter:label="City" name="city" reporter:datatype="text"/>
11373             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11374             <field reporter:label="State" name="state" reporter:datatype="text"/>
11375             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11376             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11377             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11378         </fields>
11379     </class>
11380
11381     <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">
11382         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
11383             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11384             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11385             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11386             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
11387             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
11388             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11389         </fields>
11390     </class>
11391
11392     <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">
11393         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
11394             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11395             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11396             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11397             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
11398             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
11399             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11400         </fields>
11401     </class>
11402
11403         <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">
11404                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
11405                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
11406                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11407                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
11408                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
11409                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
11410                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
11411                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
11412                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
11413                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11414                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11415                 </fields>
11416                 <links>
11417                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11418                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11419                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
11420                 </links>
11421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11422                         <actions>
11423                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11424                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11425                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11426                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11427                         </actions>
11428                 </permacrud>
11429         </class>
11430
11431         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
11432                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
11433                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
11434                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
11435                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
11436                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
11437                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
11438                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
11439                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
11440                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
11441                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
11442                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
11443                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
11444                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
11445                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
11446                 </fields>
11447                 <links>
11448                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
11449                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11450                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11451                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
11452                 </links>
11453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11454                         <actions>
11455                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11456                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11457                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11458                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11459                         </actions>
11460                 </permacrud>
11461         </class>
11462
11463         <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">
11464                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
11465                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
11466                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
11467                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
11468                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
11469                 </fields>
11470                 <links>
11471                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
11472                 </links>
11473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
11474                         <actions>
11475                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11476                     <context link="fieldset" field="owning_lib"/>
11477                 </create>
11478                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11479                     <context link="fieldset" field="owning_lib"/>
11480                 </retrieve>
11481                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11482                     <context link="fieldset" field="owning_lib"/>
11483                 </update>
11484                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11485                     <context link="fieldset" field="owning_lib"/>
11486                 </delete>
11487                         </actions>
11488                 </permacrud>
11489         </class>
11490
11491     <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">
11492         <fields>
11493             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11494             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11495             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11496         </fields>
11497                 <links>
11498                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11499                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11500                 </links>
11501     </class>
11502
11503     <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">
11504         <fields>
11505             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11506             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11507         </fields>
11508                 <links>
11509                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11510                 </links>
11511     </class>
11512
11513     <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">
11514         <fields>
11515             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11516             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11517             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11518         </fields>
11519                 <links>
11520                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11521                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11522                 </links>
11523     </class>
11524
11525     <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">
11526         <fields>
11527             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11528             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11529         </fields>
11530                 <links>
11531                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11532                 </links>
11533     </class>
11534
11535     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11536                 <oils_persist:source_definition><![CDATA[
11537
11538             SELECT  DISTINCT l.*
11539               FROM  action.unfulfilled_hold_loops l
11540                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11541               WHERE l.count = m.max
11542
11543                 ]]></oils_persist:source_definition>
11544         <fields>
11545             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11546             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11547             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11548         </fields>
11549                 <links>
11550                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11551                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11552                 </links>
11553     </class>
11554
11555         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11556                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11557                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11558                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11559                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11560                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11561                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11562                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11563                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11564                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11565                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11566                 </fields>
11567                 <links>
11568                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11569                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11570                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11571                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11572                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11573                 </links>
11574         </class>
11575
11576         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11577                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11578                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11579                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11580                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11581                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11582                 </fields>
11583                 <links>
11584                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11585                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11586                 </links>
11587         </class>
11588
11589         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11590                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11591                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11592                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11593                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11594                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11595                 </fields>
11596                 <links>
11597                 </links>
11598         </class>
11599
11600         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11601                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11602                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11603                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11604                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11605                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11606                 </fields>
11607                 <links>
11608                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11609                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11610                 </links>
11611         </class>
11612         
11613         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11614                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11615                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11616                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11617                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11618                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11619                 </fields>
11620                 <links>
11621                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11622                 </links>
11623         </class>
11624         
11625         <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">
11626                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11627                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11628                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11629                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11630                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11631                 </fields>
11632                 <links>
11633                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11634                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11635                 </links>
11636         </class>
11637
11638         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11639                 <fields oils_persist:primary="name">
11640                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11641                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11642                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11643                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11644                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11645                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11646                 </fields>
11647                 <links>
11648                 </links>
11649         </class>
11650
11651         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11652                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11653                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11654                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11655                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11656                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11657                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11658                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11659                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11660                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11661                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11662                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11663                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11664                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11665                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11666                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11667                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11668                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11669                 </fields>
11670                 <links>
11671                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11672                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11673                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11674                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11675                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11676                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11677                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11678                 </links>
11679         </class>
11680
11681         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11682                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11683                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11684                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11685                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11686                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11687                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11688                 </fields>
11689                 <links>
11690                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11691                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11692                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11693                 </links>
11694         </class>
11695
11696         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11697                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11698                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11699                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11700                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11701                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11702                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11703                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11704                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11705                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11706                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11707                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11708                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11709                 </fields>
11710                 <links>
11711                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11712                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11713                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11714                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11715                 </links>
11716         </class>
11717
11718         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11719                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11720                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11721                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11722                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11723                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11724                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11725                 </fields>
11726                 <links>
11727                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11728                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11729                 </links>
11730         </class>
11731
11732         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11733                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11734                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11735                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11736                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11737                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11738                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11739                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11740                 </fields>
11741                 <links>
11742                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11743                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11744                 </links>
11745         </class>
11746
11747         <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">
11748                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11749                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11750                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11751                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11752                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11753                 </fields>
11754                 <links>
11755                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11756                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11757                 </links>
11758         </class>
11759
11760         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11761                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11762                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11763                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11764                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11765                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11766                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11767                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11768                 </fields>
11769                 <links>
11770                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11771                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11772                 </links>
11773         </class>
11774
11775         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11776                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11777                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11778                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11779                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11780                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11781                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11782                 </fields>
11783                 <links>
11784                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11785                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11786                 </links>
11787         </class>
11788
11789         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11790                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11791                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11792                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11793                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11794                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11795                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11796                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11797                 </fields>
11798                 <links>
11799                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11800                 </links>
11801         </class>
11802
11803         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11804                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11805                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11806                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11807                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11808                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11809                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11810                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11811                 </fields>
11812                 <links>
11813                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11814                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11815                 </links>
11816         </class>
11817
11818         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11819                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11820                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11821                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11822                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11823                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11824                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11825                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11826                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11827                 </fields>
11828                 <links>
11829                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11830                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11831                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11832                 </links>
11833         </class>
11834
11835         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11836                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11837                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11838                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11839                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11840                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11841                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11842                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11843                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11844                 </fields>
11845                 <links>
11846                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11847                 </links>
11848         </class>
11849
11850         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11851                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11852                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11853                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11854                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11855                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11856                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11857                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11858                 </fields>
11859                 <links>
11860                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11861                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11862                 </links>
11863         </class>
11864
11865         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11866                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11867                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11868                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11869                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11870                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11871                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11872                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11873                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11874                 </fields>
11875                 <links>
11876                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11877                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11878                 </links>
11879         </class>
11880
11881         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11882                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11883                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11884                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11885                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11886                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11887                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11888                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11889                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11890                 </fields>
11891                 <links>
11892                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11893                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11894                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11895                 </links>
11896         </class>
11897
11898         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11899                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11900                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11901                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11902                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11903                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11904                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11905                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11906                 </fields>
11907                 <links>
11908                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11909                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11910                 </links>
11911         </class>
11912
11913         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11914                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11915                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11916                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11917                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11918                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11919                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11920                 </fields>
11921                 <links>
11922                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11923                 </links>
11924         </class>
11925
11926         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11927                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11928                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11929                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11930                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11931                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11932                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11933                 </fields>
11934                 <links>
11935                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11936                 </links>
11937         </class>
11938
11939         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11940                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11941                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11942                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11943                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11944                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11945                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11946                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11947                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11948                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11949                 </fields>
11950                 <links>
11951                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11952                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11953                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11954                 </links>
11955         </class>
11956
11957         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11958                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11959                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11960                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11961                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11962                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11963                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11964                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11965                 </fields>
11966                 <links>
11967                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11968                 </links>
11969         </class>
11970
11971         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11972                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11973                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11974                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11975                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11976                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11977                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11978                 </fields>
11979                 <links>
11980                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11981                 </links>
11982         </class>
11983
11984         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11985                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11986                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11987                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11988                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11989                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11990                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11991                 </fields>
11992                 <links>
11993                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11994                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11995                 </links>
11996         </class>
11997
11998         <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">
11999                 <fields oils_persist:primary="id">
12000                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
12001                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
12002                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
12003                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
12004                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
12005                 </fields>
12006                 <links>
12007                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
12008                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
12009                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
12010                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
12011                 </links>
12012         </class>
12013
12014         <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">
12015                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
12016                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12017                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
12018                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12019                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
12020                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
12021                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12022                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
12023                 </fields>
12024                 <links/>
12025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12026                         <actions>
12027                                 <retrieve/>
12028                         </actions>
12029                 </permacrud>
12030         </class>
12031
12032         <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">
12033                 <fields oils_persist:primary="ptype_key">
12034                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
12035                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12036                 </fields>
12037                 <links/>
12038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12039                         <actions>
12040                                 <retrieve/>
12041                         </actions>
12042                 </permacrud>
12043         </class>
12044
12045         <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">
12046                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
12047                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12048                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
12049                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12050                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
12051                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12052                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12053                 </fields>
12054                 <links>
12055                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
12056                 </links>
12057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12058                         <actions>
12059                                 <retrieve/>
12060                         </actions>
12061                 </permacrud>
12062         </class>
12063
12064         <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">
12065                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
12066                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12067                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12068                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
12069                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12070                 </fields>
12071                 <links>
12072                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
12073                 </links>
12074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12075                         <actions>
12076                                 <retrieve/>
12077                         </actions>
12078                 </permacrud>
12079         </class>
12080
12081     <class
12082         id="uvs"
12083         controller="open-ils.cstore open-ils.pcrud"
12084         oils_obj:fieldmapper="url_verify::session"
12085         oils_persist:tablename="url_verify.session"
12086         reporter:label="URL Verification Session"
12087     >
12088         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
12089             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
12090             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
12091                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
12092             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
12093             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
12094             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12095             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
12096             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
12097             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
12098         </fields>
12099
12100         <links>
12101             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12102             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12103             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
12104             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
12105             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
12106         </links>
12107
12108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12109             <actions>
12110                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
12111             </actions>
12112         </permacrud>
12113
12114     </class>
12115
12116     <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">
12117         <oils_persist:source_definition><![CDATA[
12118             SELECT
12119                 cbrebi.id AS id,  -- so we can have a pkey in our view
12120                 uvs.id AS session,
12121                 uvs.owning_lib,
12122                 cbrebi.target_biblio_record_entry
12123             FROM url_verify.session uvs
12124             JOIN container.biblio_record_entry_bucket cbreb
12125                 ON (uvs.container = cbreb.id)
12126             JOIN container.biblio_record_entry_bucket_item cbrebi
12127                 ON (cbrebi.bucket = cbreb.id)
12128         ]]></oils_persist:source_definition>
12129         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
12130             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
12131             <field reporter:label="Session" name="session" reporter:datatype="link" />
12132             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
12133             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
12134         </fields>
12135         <links>
12136             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
12137             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
12138             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
12139         </links>
12140         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12141             <actions>
12142                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
12143             </actions>
12144         </permacrud>
12145     </class>
12146
12147     <class
12148         id="uvus"
12149         controller="open-ils.cstore open-ils.pcrud"
12150         oils_obj:fieldmapper="url_verify::url_selector"
12151         oils_persist:tablename="url_verify.url_selector"
12152         reporter:label="URL Verification URL Selector"
12153     >
12154         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
12155             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
12156             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
12157                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12158             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
12159         </fields>
12160
12161         <links>
12162             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12163             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
12164         </links>
12165
12166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12167             <actions>
12168                 <create permission="URL_VERIFY">
12169                     <context link="session" field="owning_lib"/>
12170                 </create>
12171                 <retrieve permission="URL_VERIFY">
12172                     <context link="session" field="owning_lib"/>
12173                 </retrieve>
12174                 <update permission="URL_VERIFY">
12175                     <context link="session" field="owning_lib"/>
12176                 </update>
12177                 <delete permission="URL_VERIFY">
12178                     <context link="session" field="owning_lib"/>
12179                 </delete>
12180             </actions>
12181         </permacrud>
12182
12183     </class>
12184
12185     <class
12186         id="uvu"
12187         controller="open-ils.cstore open-ils.pcrud"
12188         oils_obj:fieldmapper="url_verify::url"
12189         oils_persist:tablename="url_verify.url"
12190         reporter:label="URL Verification URL"
12191     >
12192         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
12193             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
12194                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
12195                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
12196                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12197                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
12198             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12199             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12200             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
12201             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
12202             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
12203             <field reporter:label="Host" name="host" reporter:datatype="text"/>
12204             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
12205             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
12206             <field reporter:label="Path" name="path" reporter:datatype="text"/>
12207             <field reporter:label="Page" name="page" reporter:datatype="text"/>
12208             <field reporter:label="Query" name="query" reporter:datatype="text"/>
12209             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
12210             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
12211         </fields>
12212
12213         <links>
12214             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
12215             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
12216             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12217             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
12218             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
12219         </links>
12220
12221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12222             <actions>
12223                 <create permission="URL_VERIFY">
12224                     <context link="session" field="owning_lib"/>
12225                 </create>
12226                 <retrieve permission="URL_VERIFY">
12227                     <context link="session" field="owning_lib"/>
12228                 </retrieve>
12229                 <update permission="URL_VERIFY">
12230                     <context link="session" field="owning_lib"/>
12231                 </update>
12232                 <delete permission="URL_VERIFY">
12233                     <context link="session" field="owning_lib"/>
12234                 </delete>
12235             </actions>
12236         </permacrud>
12237
12238     </class>
12239
12240     <class
12241         id="uvva"
12242         controller="open-ils.cstore open-ils.pcrud"
12243         oils_obj:fieldmapper="url_verify::verification_attempt"
12244         oils_persist:tablename="url_verify.verification_attempt"
12245         reporter:label="URL Verification Attempt"
12246     >
12247         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
12248             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
12249                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
12250                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
12251             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
12252             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
12253         </fields>
12254
12255         <links>
12256             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12257             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12258         </links>
12259
12260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12261             <actions>
12262                 <create permission="URL_VERIFY">
12263                     <context link="session" field="owning_lib"/>
12264                 </create>
12265                 <retrieve permission="URL_VERIFY">
12266                     <context link="session" field="owning_lib"/>
12267                 </retrieve>
12268                 <update permission="URL_VERIFY">
12269                     <context link="session" field="owning_lib"/>
12270                 </update>
12271                 <delete permission="URL_VERIFY">
12272                     <context link="session" field="owning_lib"/>
12273                 </delete>
12274             </actions>
12275         </permacrud>
12276
12277     </class>
12278
12279     <class
12280         id="uvuv"
12281         controller="open-ils.cstore open-ils.pcrud"
12282         oils_obj:fieldmapper="url_verify::url_verification"
12283         oils_persist:tablename="url_verify.url_verification"
12284         reporter:label="URL Verification"
12285     >
12286         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
12287             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
12288                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
12289                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
12290             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
12291             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
12292             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
12293             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
12294                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
12295         </fields>
12296
12297         <links>
12298             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
12299             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
12300             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
12301         </links>
12302
12303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12304             <actions>
12305                 <create permission="URL_VERIFY">
12306                     <context link="attempt" jump="session" field="owning_lib"/>
12307                 </create>
12308                 <retrieve permission="URL_VERIFY">
12309                     <context link="attempt" jump="session" field="owning_lib"/>
12310                 </retrieve>
12311                 <update permission="URL_VERIFY">
12312                     <context link="attempt" jump="session" field="owning_lib"/>
12313                 </update>
12314                 <delete permission="URL_VERIFY">
12315                     <context link="attempt" jump="session" field="owning_lib"/>
12316                 </delete>
12317             </actions>
12318         </permacrud>
12319
12320     </class>
12321
12322         <class
12323                 id="cfdi"
12324                 controller="open-ils.cstore open-ils.pcrud"
12325                 oils_obj:fieldmapper="config::filter_dialog_interface"
12326                 oils_persist:tablename="config.filter_dialog_interface"
12327                 reporter:label="FilterDialog Interface">
12328                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
12329                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
12330                         <field reporter:label="Description" name="description" reporter:datatype="text" />
12331                 </fields>
12332                 <links>
12333                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
12334                 </links>
12335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12336                         <actions>
12337                                 <retrieve />
12338                         </actions>
12339                 </permacrud>
12340         </class>
12341
12342         <class
12343                 id="cfdfs"
12344                 controller="open-ils.cstore open-ils.pcrud"
12345                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
12346                 oils_persist:tablename="config.filter_dialog_filter_set"
12347                 reporter:label="FilterDialog Filter Set">
12348                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
12349                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12350                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12351                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12352                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12353                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
12354                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12355                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
12356                 </fields>
12357                 <links>
12358                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12359                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12360                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
12361                 </links>
12362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12363                         <actions>
12364                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12365                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12366                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12367                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12368                         </actions>
12369                 </permacrud>
12370
12371         </class>
12372
12373         <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">
12374                 <fields oils_persist:primary="code">
12375                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
12376                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
12377                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
12378                 </fields>
12379                 <links/>
12380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12381                         <actions>
12382                                 <retrieve/>
12383                         </actions>
12384                 </permacrud>
12385         </class>
12386
12387         <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">
12388                 <oils_persist:source_definition><![CDATA[
12389
12390             SELECT  b.id,
12391                     MAX(dcp.edit_date) AS last_delete_date
12392              FROM   biblio.record_entry b
12393                     JOIN asset.call_number cn ON (cn.record = b.id)
12394                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
12395              WHERE  NOT b.deleted
12396              GROUP BY b.id
12397              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
12398
12399                 ]]></oils_persist:source_definition>
12400                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12401                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12402                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
12403                 </fields>
12404                 <links>
12405                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12406                 </links>
12407                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12408                         <actions>
12409                                 <retrieve/>
12410                         </actions>
12411                 </permacrud>
12412         </class>
12413
12414         <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">
12415                 <fields oils_persist:primary="id">
12416                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12417                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12418                 </fields>
12419                 <links/>
12420                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12421                         <actions>
12422                                 <retrieve/>
12423                         </actions>
12424                 </permacrud>
12425         </class>
12426
12427         <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">
12428                 <fields oils_persist:primary="id">
12429                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12430                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12431                 </fields>
12432                 <links/>
12433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12434                         <actions>
12435                                 <retrieve/>
12436                         </actions>
12437                 </permacrud>
12438         </class>
12439
12440
12441         <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">
12442                 <oils_persist:source_definition><![CDATA[
12443
12444             -- -- 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.
12445             -- -- 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
12446             -- -- may not.
12447             -- SELECT
12448             --     bre.id AS bib_id,
12449             --     COALESCE( z.copy_count, 0 ) AS copy_count,
12450             --     COALESCE( z.hold_count, 0 ) AS hold_count,
12451             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
12452             -- FROM (
12453                 SELECT
12454                     y.bre AS id,
12455                     COALESCE( x.copy_count, 0 ) AS copy_count,
12456                     y.hold_count AS hold_count,
12457                     (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
12458                 FROM (
12459                         SELECT
12460                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
12461                             COUNT(*) AS hold_count
12462                         FROM action.hold_request h
12463                         WHERE
12464                             cancel_time IS NULL
12465                             AND fulfillment_time IS NULL
12466                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
12467                         GROUP BY 1
12468                     )y LEFT JOIN (
12469                         SELECT 
12470                             (SELECT id
12471                                 FROM biblio.record_entry 
12472                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
12473                             ) AS bre, 
12474                             COUNT(*) AS copy_count
12475                         FROM asset.copy
12476                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
12477                         WHERE copy.holdable 
12478                             AND NOT copy.deleted 
12479                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
12480                         GROUP BY 1
12481                     )x ON x.bre = y.bre
12482                 -- )z RIGHT JOIN (
12483                 --     SELECT id
12484                 --     FROM biblio.record_entry
12485                 --     WHERE NOT deleted
12486                 -- )bre ON (z.bib_id = bre.id)
12487                 
12488
12489                 ]]></oils_persist:source_definition>
12490                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12491                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12492                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
12493                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
12494                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
12495                 </fields>
12496                 <links>
12497                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12498                 </links>
12499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12500                         <actions>
12501                                 <retrieve/>
12502                         </actions>
12503                 </permacrud>
12504         </class>
12505
12506         <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">
12507                 <oils_persist:source_definition><![CDATA[
12508             SELECT *,
12509                 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,
12510                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12511             FROM
12512                 (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
12513                     FROM
12514                         action.hold_request ahr
12515                         JOIN reporter.hold_request_record rhrr USING (id)
12516                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12517                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12518                     WHERE
12519                         ahr.cancel_time IS NULL
12520                         AND ahr.fulfillment_time IS NULL
12521                     GROUP BY bib_record, pickup_lib
12522                 )x
12523                 JOIN
12524                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12525                     FROM
12526                         action.hold_request ahr
12527                         JOIN reporter.hold_request_record rhrr USING (id)
12528                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12529                     WHERE
12530                         ahr.cancel_time IS NULL
12531                         AND ahr.fulfillment_time IS NULL
12532                     GROUP BY bib_record
12533                 )y
12534                 USING (id)
12535                 ]]></oils_persist:source_definition>
12536                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12537                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12538                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12539                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12540                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12541                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12542                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12543                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12544                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12545                 </fields>
12546                 <links>
12547                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12548                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12549                 </links>
12550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12551                         <actions>
12552                                 <retrieve/>
12553                         </actions>
12554                 </permacrud>
12555         </class>
12556
12557         <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) ">
12558                 <oils_persist:source_definition><![CDATA[
12559             WITH counts_at_ou AS (
12560                 SELECT  rhrr.bib_record AS id,
12561                         aou.id AS pickup_lib_or_desc,
12562                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
12563                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
12564                   FROM  actor.org_unit aou
12565                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12566                         action.hold_request ahr
12567                         JOIN reporter.hold_request_record rhrr USING (id)
12568                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12569                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12570                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12571                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12572                         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
12573                   GROUP BY 1, 2
12574             )
12575             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12576                    y.holds_everywhere, y.copy_count_everywhere,
12577                 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,
12578                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12579             FROM counts_at_ou x
12580                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12581                     FROM
12582                         action.hold_request ahr
12583                         JOIN reporter.hold_request_record rhrr USING (id)
12584                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12585                     WHERE
12586                         ahr.cancel_time IS NULL
12587                         AND ahr.fulfillment_time IS NULL
12588                     GROUP BY bib_record
12589                 )y
12590                 USING (id)
12591                 ]]></oils_persist:source_definition>
12592                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12593                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12594                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12595                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12596                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12597                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12598                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12599                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12600                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12601                 </fields>
12602                 <links>
12603                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12604                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12605                 </links>
12606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12607                         <actions>
12608                                 <retrieve/>
12609                         </actions>
12610                 </permacrud>
12611         </class>
12612
12613         <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">
12614                 <oils_persist:source_definition><![CDATA[
12615             SELECT
12616                 ac.id,
12617                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12618                 MAX(actac.xact_start) AS last_circ
12619             FROM asset.copy ac
12620                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12621             GROUP BY ac.id
12622
12623             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12624             --SELECT
12625             --    ac.id,
12626             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12627             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12628             --FROM asset.copy ac
12629             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12630             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12631             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12632                 ]]></oils_persist:source_definition>
12633                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12634                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12635                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12636                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12637                 </fields>
12638                 <links>
12639                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12640                 </links>
12641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12642                         <actions>
12643                                 <retrieve/>
12644                         </actions>
12645                 </permacrud>
12646         </class>
12647
12648         <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">
12649                 <fields oils_persist:primary="id">
12650                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12651                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12652                 </fields>
12653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12654                         <actions>
12655                                 <retrieve/>
12656                         </actions>
12657                 </permacrud>
12658         </class>
12659
12660         <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">
12661                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12662                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12663                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12664                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12665                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12666                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12667                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12668                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12669                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12670                 </fields>
12671                 <links>
12672                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12673                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12674                 </links>
12675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12676                         <actions>
12677                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12678                                 <retrieve/>
12679                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12680                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12681                         </actions>
12682                 </permacrud>
12683         </class>
12684
12685         <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">
12686                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12687                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12688                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12689                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12690                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12691                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12692                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12693                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12694                 </fields>
12695                 <links>
12696                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12697                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12698                 </links>
12699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12700                         <actions>
12701                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12702                                 <retrieve/>
12703                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12704                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12705                         </actions>
12706                 </permacrud>
12707         </class>
12708
12709
12710         <!-- ********************************************************************************************************************* -->
12711         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12712         <!-- ********************************************************************************************************************* -->
12713         <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">
12714                 <fields oils_persist:primary="id">
12715                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12716                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12717                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12718                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12719                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12720                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12721                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12722                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12723                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12724                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12725                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12726                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12727                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12728                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12729                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12730                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12731                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12732                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12733                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12734                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12735                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12736                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12737                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12738                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12739                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12740                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12741                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12742                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12743                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12744                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12745                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12746                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12747                 </fields>
12748                 <links>
12749                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12750                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12751                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12752                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12753                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12754                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12755                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12756                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12757                 </links>
12758         </class>
12759
12760         <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">
12761                 <fields oils_persist:primary="id">
12762                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12763                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12764                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12765                 </fields>
12766                 <links>
12767                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12768                 </links>
12769         </class>
12770
12771         <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">
12772                 <fields oils_persist:primary="id">
12773                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12774                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12775                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12776                 </fields>
12777                 <links>
12778                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12779                 </links>
12780         </class>
12781
12782         <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">
12783                 <fields oils_persist:primary="id">
12784                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12785
12786                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12787                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12788                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12789
12790                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12791                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12792                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12793
12794                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12795                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12796
12797                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12798                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12799                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12800
12801                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12802                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12803
12804                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12805                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12806                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12807
12808                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12809                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12810                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12811
12812                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12813                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12814                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12815                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12816
12817                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12818                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12819
12820                 </fields>
12821                 <links>
12822                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12823                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12824                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12825                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12826                 </links>
12827         </class>
12828
12829         <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">
12830                 <oils_persist:source_definition><![CDATA[
12831
12832             SELECT
12833                 po.ordering_agency AS ordering_agency,
12834                 po.id AS purchase_order,
12835                 li.id AS lineitem,
12836                 lid.id AS lineitem_detail,
12837                 cpa.id AS claim_policy_action
12838             FROM
12839                 acq.lineitem_detail lid
12840                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12841                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12842                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12843                 JOIN acq.claim_policy_action cpa ON (
12844                     cpa.claim_policy = cp.id
12845
12846                     -- we only care about claim policy actions whose claim
12847                     -- interval we'd reached or exceeded
12848                     AND (NOW() - cpa.action_interval) > po.order_date
12849
12850                     -- filter out all claim policy actions where claim events
12851                     -- have occurred on or after the action's action_interval
12852                     AND NOT EXISTS (
12853                         SELECT 1
12854                         FROM
12855                             acq.claim_event evt
12856                             JOIN acq.claim claim ON (
12857                                 claim.id = evt.claim
12858                                 AND claim.lineitem_detail = lid.id
12859                             )
12860                         WHERE
12861                             evt.event_date >= (po.order_date + cpa.action_interval)
12862                     )
12863                 )
12864             WHERE
12865                 lid.cancel_reason IS NULL
12866                 AND li.cancel_reason IS NULL -- belt/suspenders
12867                 AND po.cancel_reason IS NULL -- belt/suspenders
12868                 AND lid.recv_time IS NULL
12869                 AND po.state = 'on-order'
12870             ORDER BY 1, 2, 3, 4, 5
12871
12872                 ]]></oils_persist:source_definition>
12873                 <fields>
12874                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12875                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12876                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12877                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12878                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12879                 </fields>
12880                 <links>
12881                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12882                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12883                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12884                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12885                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12886                 </links>
12887         </class>
12888         <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">
12889                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12890                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12891                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12892                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12893                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12894                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12895                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12896                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12897                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12898                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12899                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12900                 </fields>
12901                 <links>
12902                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12903                 </links>
12904     </class>
12905         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12906                 <oils_persist:source_definition><![CDATA[
12907             SELECT * FROM acq.lineitem_summary 
12908                                 WHERE item_count > (invoice_count + cancel_count)
12909         ]]></oils_persist:source_definition>
12910                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12911                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12912                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12913                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12914                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12915                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12916                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12917                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12918                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12919                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12920                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12921                 </fields>
12922                 <links>
12923                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12924                 </links>
12925     </class>
12926         <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">
12927                 <oils_persist:source_definition><![CDATA[
12928
12929                         SELECT  t.*
12930                           FROM  action.transit_copy t
12931                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12932                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12933                           WHERE s.parent_ou <> d.parent_ou
12934
12935                 ]]></oils_persist:source_definition>
12936                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12937                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12938                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12939                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12940                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12941                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12942                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12943                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12944                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12945                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12946                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12947                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12948                 </fields>
12949                 <links>
12950                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12951                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12952                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12953                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12954                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12955                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12956                 </links>
12957         </class>
12958
12959     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12960                 <oils_persist:source_definition><![CDATA[
12961
12962         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12963                 SELECT
12964                         cp.id as copy,
12965                         COUNT(circ.id),
12966                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12967                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12968                 FROM
12969                         asset.copy cp
12970                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12971                 GROUP BY 1, 3, 4
12972                 UNION ALL
12973                 SELECT
12974                         cp.id as copy,
12975                         COUNT(circ.id),
12976                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12977                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12978                 FROM
12979                         asset.copy cp
12980                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12981                 GROUP BY 1, 3, 4
12982                 UNION ALL
12983                 SELECT
12984                         id as copy,
12985                         circ_count,
12986                         -1 AS year,
12987                         false as is_renewal
12988                 FROM
12989                         extend_reporter.legacy_circ_count
12990         )x GROUP BY 1, 3, 4
12991
12992                 ]]></oils_persist:source_definition>
12993         <fields>
12994             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12995             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12996             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12997             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12998         </fields>
12999                 <links>
13000                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13001                 </links>
13002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13003                         <actions>
13004                                 <retrieve/>
13005                         </actions>
13006                 </permacrud>
13007     </class>
13008
13009         <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">
13010                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
13011                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
13012                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
13013                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
13014                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
13015                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
13016                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
13017                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
13018                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
13019                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
13020                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
13021                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
13022                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
13023                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
13024                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
13025                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
13026                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
13027                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
13028                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
13029                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
13030                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
13031                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
13032                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
13033                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
13034                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
13035                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
13036                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
13037                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
13038                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
13039                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
13040                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
13041                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
13042                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
13043                 </fields>
13044                 <links>
13045                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
13046                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
13047                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
13048                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
13049                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
13050                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
13051                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13052                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
13053                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
13054                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
13055                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
13056                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
13057                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
13058                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
13059                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
13060                 </links>
13061         </class>
13062
13063     <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">
13064         <fields oils_persist:primary="id">
13065             <field reporter:label="Title" name="title" reporter:datatype="text"/>
13066             <field reporter:label="Author" name="author" reporter:datatype="text"/>
13067             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
13068             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13069             <field reporter:label="Price" name="price" reporter:datatype="money"/>
13070             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
13071             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
13072             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
13073             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
13074             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
13075             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
13076             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
13077             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
13078             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
13079             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
13080             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
13081             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
13082             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
13083             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
13084             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
13085             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
13086             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
13087             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
13088             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
13089             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
13090             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
13091             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
13092             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
13093             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
13094             <field reporter:label="Status" name="status" reporter:datatype="link"/>
13095             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
13096             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
13097             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
13098             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
13099         </fields>
13100         <links>
13101             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13102             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
13103             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13104             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13105             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
13106             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
13107             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
13108             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
13109         </links>
13110     </class>
13111
13112     <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">
13113         <fields oils_persist:primary="id">
13114             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13115             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13116             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13117             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13118         </fields>
13119         <links>
13120             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13121             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13122         </links>
13123     </class>
13124
13125     <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">
13126         <fields oils_persist:primary="owning_lib">
13127             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13128             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13129             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13130         </fields>
13131         <links>
13132             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13133         </links>
13134     </class>
13135
13136     <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">
13137         <fields oils_persist:primary="id">
13138             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13139             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13140             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13141             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13142             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13143         </fields>
13144         <links>
13145             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13146             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13147             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13148         </links>
13149     </class>
13150
13151     <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">
13152         <fields oils_persist:primary="circ_lib">
13153             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13154             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13155             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13156             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13157         </fields>
13158         <links>
13159             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13160             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13161         </links>
13162     </class>
13163
13164     <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">
13165         <fields oils_persist:primary="id">
13166             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13167             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13168             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13169             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13170             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13171         </fields>
13172         <links>
13173             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13174             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13175             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13176         </links>
13177     </class>
13178
13179     <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">
13180         <fields oils_persist:primary="home_ou">
13181             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13182             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13183             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13184             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13185         </fields>
13186         <links>
13187             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13188             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13189         </links>
13190     </class>
13191         <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">
13192                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
13193                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
13194                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13195                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13196                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
13197                 </fields>
13198                 <links>
13199                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13200                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
13201                 </links>
13202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13203                         <actions>
13204                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13205                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
13206                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13207                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13208                         </actions>
13209                 </permacrud>
13210         </class>
13211         <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">
13212                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
13213                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
13214                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
13215                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
13216                 </fields>
13217                 <links>
13218                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
13219                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
13220                         </links>
13221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13222                 <actions>
13223                                 <create permission="ADMIN_ACQ_FUND_TAG">
13224                                         <context link="tag" field="owner"/>
13225                                 </create>
13226                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
13227                                         <context link="tag" field="owner"/>
13228                                 </retrieve>
13229                                 <update permission="ADMIN_ACQ_FUND_TAG">
13230                                         <context link="tag" field="owner"/>
13231                                 </update>
13232                                 <delete permission="ADMIN_ACQ_FUND_TAG">
13233                                         <context link="tag" field="owner"/>
13234                                 </delete>
13235                         </actions>
13236                 </permacrud>
13237         </class>
13238         <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">
13239                 <oils_persist:source_definition><![CDATA[
13240                 SELECT
13241                         poi.purchase_order AS purchase_order,
13242                         ii.invoice AS invoice,
13243                         NULL AS lineitem,
13244                         poi.id AS po_item,
13245                         NULL AS picklist
13246                 FROM
13247                         acq.po_item poi
13248                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
13249                 UNION SELECT
13250                         jub.purchase_order AS purchase_order,
13251                         ie.invoice AS invoice,
13252                         jub.id AS lineitem,
13253                         NULL AS po_item,
13254                         jub.picklist AS picklist
13255                 FROM
13256                         acq.lineitem jub
13257                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
13258                 UNION SELECT
13259                         ii.purchase_order AS purchase_order,
13260                         ii.invoice AS invoice,
13261                         NULL AS lineitem,
13262                         NULL AS po_item,
13263                         NULL AS picklist
13264                 FROM
13265                         acq.invoice_item ii
13266                 WHERE ii.po_item IS NULL
13267                 UNION SELECT
13268                         ie.purchase_order AS purchase_order,
13269                         ie.invoice AS invoice,
13270                         NULL AS lineitem,
13271                         NULL AS po_item,
13272                         NULL AS picklist
13273                 FROM
13274                         acq.invoice_entry ie
13275                 WHERE ie.lineitem IS NULL
13276                 UNION SELECT
13277                         NULL AS purchase_order,
13278                         NULL AS invoice,
13279                         jub.id AS lineitem,
13280                         NULL AS po_item,
13281                         jub.picklist AS picklist
13282                 FROM
13283                         acq.lineitem jub
13284                 WHERE jub.purchase_order IS NULL
13285                 ]]></oils_persist:source_definition>
13286                 <fields>
13287                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
13288                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
13289                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
13290                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
13291                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
13292                 </fields>
13293                 <links>
13294                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
13295                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
13296                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
13297                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
13298                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
13299                 </links>
13300         </class>
13301         <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">
13302                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
13303                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13304                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13305                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
13306                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
13307                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
13308                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
13309                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
13310                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
13311                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
13312                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
13313                 </fields>
13314                 <links>
13315                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13316                 </links>
13317                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13318                         <actions>
13319                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13320                                 <retrieve/>
13321                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13322                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13323                         </actions>
13324                 </permacrud>
13325         </class>
13326
13327         <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">
13328                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
13329                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13330                         <field name="date_applied" reporter:datatype="timestamp"/>
13331                         <field name="org" reporter:datatype="org_unit"/>
13332                         <field name="original_value" reporter:datatype="text"/>
13333                         <field name="new_value" reporter:datatype="text"/>
13334                         <field name="field_name" reporter:datatype="link"/>
13335                 </fields>
13336                 <links>
13337                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
13338                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
13339                 </links>
13340         </class>
13341         <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">
13342                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13343                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13344                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13345                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13346                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13347                 </fields>
13348                 <links>
13349                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13350                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
13351                 </links>
13352         </class>
13353         <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">
13354                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13355                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13356                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13357                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13358                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13359                 </fields>
13360                 <links>
13361                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13362                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
13363                 </links>
13364         </class>
13365         <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">
13366                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
13367                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
13368                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13369                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
13370                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
13371                 </fields>
13372                 <links>
13373                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
13374                 </links>
13375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13376                         <actions>
13377                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13378                                 <retrieve/>
13379                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13380                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13381                         </actions>
13382                 </permacrud>
13383         </class>
13384         <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">
13385                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
13386                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13387                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
13388                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
13389                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
13390                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
13391                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
13392                 </fields>
13393                 <links>
13394                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
13395                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
13396                 </links>
13397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13398                         <actions>
13399                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13400                                 <retrieve/>
13401                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13402                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13403                         </actions>
13404                 </permacrud>
13405         </class>
13406         <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">
13407                 <fields oils_persist:primary="code">
13408                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
13409                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
13410                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13411                 </fields>
13412                 <links>
13413                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13414                 </links>
13415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13416                         <actions>
13417                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13418                                 <retrieve/>
13419                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13420                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13421                         </actions>
13422                 </permacrud>
13423         </class>
13424         <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">
13425                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
13426                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13427                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
13428                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
13429                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13430                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
13431                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
13432                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13433                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
13434                 </fields>
13435                 <links>
13436                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
13437                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13438                 </links>
13439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13440                         <actions>
13441                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
13442                                 <retrieve/>
13443                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
13444                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
13445                         </actions>
13446                 </permacrud>
13447         </class>
13448         <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">
13449                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
13450                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13451                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
13452                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
13453                 </fields>
13454                 <links>
13455                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13456                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
13457                 </links>
13458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13459                         <actions>
13460                                 <create permission="UPDATE_COPY">
13461                     <context link="copy" field="circ_lib"/>
13462                 </create>
13463                                 <retrieve/>
13464                                 <update permission="UPDATE_COPY">
13465                     <context link="copy" field="circ_lib"/>
13466                 </update>
13467                                 <delete permission="UPDATE_COPY">
13468                     <context link="copy" field="circ_lib"/>
13469                 </delete>
13470                         </actions>
13471                 </permacrud>
13472         </class>
13473         <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">
13474         <oils_persist:source_definition><![CDATA[
13475         SELECT ahcm.target_copy AS id,count(*) AS count
13476          FROM
13477          action.hold_request ahr,
13478          action.hold_copy_map ahcm
13479          WHERE
13480          ahr.cancel_time IS NULL AND
13481          ahr.fulfillment_time IS NULL AND
13482          ahr.capture_time IS NULL AND
13483          ahr.id = ahcm.hold
13484          GROUP BY ahcm.target_copy
13485         ]]></oils_persist:source_definition>
13486         <fields oils_persist:primary="id">
13487             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13488             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
13489         </fields>
13490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13491             <actions>
13492                <retrieve/>
13493             </actions>
13494         </permacrud>
13495         </class>
13496
13497         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
13498                 oils_obj:fieldmapper="config::workstation_setting_type" 
13499                 oils_persist:tablename="config.workstation_setting_type" 
13500                 reporter:label="Workstation Setting Type">
13501                 <fields oils_persist:primary="name">
13502                         <field name="name" reporter:datatype="text"/>
13503                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
13504                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
13505                         <field name="datatype" reporter:datatype="text"/>
13506                         <field name="fm_class" reporter:datatype="text"/>
13507                         <field name="grp" reporter:datatype="link"/>
13508                 </fields>
13509                 <links>
13510                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13511                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13512                 </links>
13513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13514                         <actions>
13515                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13516                                 <retrieve/>
13517                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13518                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13519                         </actions>
13520                 </permacrud>
13521         </class>
13522
13523         <!-- no pcrud access is granted for now, because it's assumed these
13524                          setting values will be applied and retrived via the API. -->
13525         <class id="awss" 
13526                 controller="open-ils.cstore"
13527                 oils_obj:fieldmapper="actor::workstation_setting" 
13528                 oils_persist:tablename="actor.workstation_setting" 
13529                 reporter:label="Workstation Setting">
13530                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13531                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13532                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13533                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13534                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13535                 </fields>
13536                 <links>
13537                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13538                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13539                 </links>
13540         </class>
13541
13542         <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">
13543         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13544                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13545                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13546                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13547         </fields>
13548         </class>
13549
13550         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13551                 oils_obj:fieldmapper="config::print_template" 
13552                 oils_persist:tablename="config.print_template" 
13553                 reporter:label="Print Templates">
13554                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13555                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13556                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13557                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13558                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13559                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13560                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13561                         <field name="content_type" reporter:datatype="text"/>
13562                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13563                 </fields>
13564                 <links>
13565                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13566                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13567                 </links>
13568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13569                         <actions>
13570                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13571                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13572                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13573                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13574                         </actions>
13575                 </permacrud>
13576         </class>
13577
13578         <class id="cct" 
13579                 controller="open-ils.cstore open-ils.pcrud"
13580                 oils_obj:fieldmapper="config::carousel_type" 
13581                 oils_persist:tablename="config.carousel_type" 
13582                 reporter:label="Carousel Types">
13583                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13584                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13585                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13586                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13587                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13588                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13589                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13590                 </fields>
13591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13592                         <actions>
13593                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13594                                 <retrieve/>
13595                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13596                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13597                         </actions>
13598                 </permacrud>
13599         </class>
13600
13601         <class id="cc" 
13602                 controller="open-ils.cstore open-ils.pcrud"
13603                 oils_obj:fieldmapper="container::carousel" 
13604                 oils_persist:tablename="container.carousel" 
13605                 reporter:label="Carousels">
13606                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13607                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13608                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13609                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13610                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13611                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13612                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13613                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13614                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13615                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13616                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13617                         <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 -->
13618                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13619                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13620                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13621                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13622                 </fields>
13623                 <links>
13624                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13625                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13626                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13627                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13628                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13629                 </links>
13630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13631                         <actions>
13632                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13633                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13634                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13635                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13636                         </actions>
13637                 </permacrud>
13638         </class>
13639
13640         <class id="ccou" 
13641                 controller="open-ils.cstore open-ils.pcrud"
13642                 oils_obj:fieldmapper="container::carousel_org_unit" 
13643                 oils_persist:tablename="container.carousel_org_unit" 
13644                 reporter:label="Carousels Visible at Library">
13645                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13646                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13647                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13648                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13649                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13650                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13651                 </fields>
13652                 <links>
13653                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13654                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13655                 </links>
13656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13657                         <actions>
13658                                 <create permission="ADMIN_CAROUSEL">
13659                                     <context link="carousel" field="owner" />
13660                                 </create>
13661                                 <retrieve permission="ADMIN_CAROUSEL">
13662                                     <context link="carousel" field="owner" />
13663                                 </retrieve>
13664                                 <update permission="ADMIN_CAROUSEL">
13665                                     <context link="carousel" field="owner" />
13666                                 </update>
13667                                 <delete permission="ADMIN_CAROUSEL">
13668                                     <context link="carousel" field="owner" />
13669                                 </delete>
13670                         </actions>
13671                 </permacrud>
13672         </class>
13673
13674         <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">
13675                 <fields oils_persist:primary="name">
13676                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13677                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13678                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13679                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13680                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13681                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13682                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13683                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13684                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13685                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13686                 </fields>
13687                 <links>
13688                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13689                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13690                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13691                 </links>
13692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13693                         <actions>
13694                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13695                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13696                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13697                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13698                         </actions>
13699                 </permacrud>
13700         </class>
13701         <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">
13702                 <fields oils_persist:primary="id" oils_persist:sequence="config.geolocation_service_id_seq">
13703                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
13704                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true"/>
13705                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13706                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
13707                         <field reporter:label="Service Code" name="service_code" reporter:datatype="text"/>
13708                         <field reporter:label="API Key" name="api_key" reporter:datatype="text"/>
13709                 </fields>
13710                 <links>
13711                         <link field="owner" reltype="has_a" key="id" class="aou"/>
13712                 </links>
13713                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13714                         <actions>
13715                                 <create permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13716                                 <retrieve permission="VIEW_GEOLOCATION_SERVICES" global_required="true"/>
13717                                 <update permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13718                                 <delete permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13719                         </actions>
13720                 </permacrud>
13721         </class>
13722
13723         <!-- ********************************************************************************************************************* -->
13724 </IDL>
13725
13726 <!--
13727     vim:noet:ts=4:sw=4:
13728 -->