]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
0eab159604be6f2b249ae24cc230abcc194b70f0
[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 Folding is Case-Insensitive" name="browse_nocase" reporter:datatype="bool" />
3124                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
3125                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
3126                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
3127                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3128                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
3129                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
3130                 </fields>
3131                 <links>
3132                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
3133                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3134                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
3135                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
3136                 </links>
3137         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3138             <actions>
3139                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3140                 <retrieve/>
3141                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3142                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3143             </actions>
3144         </permacrud>
3145         </class>
3146
3147         <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">
3148                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
3149                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3150                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
3151                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
3152                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
3153                 </fields>
3154                 <links>
3155                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
3156                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
3157                 </links>
3158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3159             <actions>
3160                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3161                 <retrieve/>
3162                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3163                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3164             </actions>
3165         </permacrud>
3166         </class>
3167
3168         <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">
3169                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
3170                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
3171                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3172                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
3173                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
3174                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
3175                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
3176                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
3177                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
3178                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
3179                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
3180                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
3181                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
3182                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
3183                 </fields>
3184                 <links>
3185                 </links>
3186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3187                         <actions>
3188                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3189                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3190                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3191                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3192                         </actions>
3193                 </permacrud>
3194         </class>
3195         <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">
3196                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3197                         <field name="id" reporter:datatype="id" />
3198                         <field name="name" reporter:datatype="text"/>
3199                         <field name="xpath" reporter:datatype="text"/>
3200                         <field name="format" reporter:datatype="link"/>
3201                         <field name="first_word" reporter:datatype="bool" />
3202                 </fields>
3203                 <links/>
3204         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3205             <actions>
3206                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3207                 <retrieve/>
3208                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3209                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3210             </actions>
3211         </permacrud>
3212         </class>
3213         <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">
3214                 <fields oils_persist:primary="code" oils_persist:sequence="">
3215                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3216                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3217                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3218                 </fields>
3219                 <links/>
3220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3221             <actions>
3222                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3223                 <retrieve/>
3224                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3225                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3226             </actions>
3227         </permacrud>
3228         </class>
3229         <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">
3230                 <fields oils_persist:primary="code" oils_persist:sequence="">
3231                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3232                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3233                 </fields>
3234                 <links/>
3235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3236             <actions>
3237                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3238                 <retrieve/>
3239                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3240                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3241             </actions>
3242         </permacrud>
3243         </class>
3244     <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">
3245         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_id_seq">
3246             <field reporter:label="ID" name="id" reporter:datatype="id" />
3247             <field reporter:label="Course Name" name="name" reporter:datatype="text" oils_obj:required="true" />
3248             <field reporter:label="Course Number" name="course_number" reporter:datatype="text" oils_obj:required="true" />
3249             <field reporter:label="Section Number" name="section_number" reporter:datatype="text" />
3250             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3251             <field reporter:label="Course Members" name="members" oils_persist:virtual="true" reporter:datatype="link" />
3252             <field reporter:label="Course Materials" name="materials" oils_persist:virtual="true" reporter:datatype="link" />
3253             <field reporter:label="Is Archived?" name="is_archived" reporter:datatype="bool" />
3254                         <field reporter:label="Terms Taught" name="terms_map" oils_persist:virtual="true" reporter:datatype="link" config_field="true" />
3255         </fields>
3256         <links>
3257             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3258             <link field="members" reltype="has_many" key="course" map="" class="acmcu" />
3259             <link field="materials" reltype="has_many" key="course" map="" class="acmcm" />
3260                         <link field="terms_map" reltype="has_many" key="course" map="" class="acmtcm" />
3261         </links>
3262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3263             <actions>
3264                 <create permission="MANAGE_RESERVES" context_field="owning_lib"/>
3265                 <retrieve/>
3266                 <update permission="MANAGE_RESERVES" context_field="owning_lib"/>
3267                 <delete permission="MANAGE_RESERVES" context_field="owning_lib"/>
3268             </actions>
3269         </permacrud>
3270     </class>
3271     <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">
3272         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_users_id_seq">
3273             <field reporter:label="ID" name="id" reporter:datatype="id" />
3274             <field reporter:label="Course" name="course" reporter:datatype="link" />
3275             <field reporter:label="User" name="usr" reporter:datatype="link" />
3276             <field reporter:label="User Role" name="usr_role" reporter:datatype="link" />
3277         </fields>
3278         <links>
3279             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3280             <link field="usr" reltype="has_a" key="id" map="" class="au" />
3281             <link field="usr_role" reltype="has_a" key="id" map="" class="acmr" />
3282         </links>
3283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3284             <actions>
3285                 <create permission="MANAGE_RESERVES">
3286                                         <context link="course" field="owning_lib" />
3287                 </create>
3288                 <retrieve/>
3289                 <update permission="MANAGE_RESERVES">
3290                                         <context link="course" field="owning_lib" />
3291                 </update>
3292                 <delete permission="MANAGE_RESERVES">
3293                                         <context link="course" field="owning_lib" />
3294                 </delete>
3295             </actions>
3296         </permacrud>
3297     </class>
3298     <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">
3299         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_materials_id_seq">
3300             <field reporter:label="ID" name="id" reporter:datatype="id" />
3301             <field reporter:label="Course" name="course" reporter:datatype="link" />
3302             <field reporter:label="Item" name="item" reporter:datatype="link" />
3303             <field reporter:label="Record" name="record" reporter:datatype="link" />
3304             <field reporter:label="Record is temporary?" name="temporary_record" reporter:datatype="bool" />
3305             <field reporter:label="Item Relationship" name="relationship" reporter:datatype="text" />
3306             <field reporter:label="Original Status" name="original_status" reporter:datatype="link" />
3307             <field reporter:label="Original Circ Modifier" name="original_circ_modifier" reporter:datatype="link" />
3308             <field reporter:label="Original Shelving Location" name="original_location" reporter:datatype="link" />
3309             <field reporter:label="Original Callnumber" name="original_callnumber" reporter:datatype="link" />
3310         </fields>
3311         <links>
3312             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3313             <link field="item" reltype="has_a" key="id" map="" class="acp" />
3314             <link field="record" reltype="has_a" key="id" map="" class="bre" />
3315             <link field="original_callnumber" reltype="has_a" key="id" map="" class="acn" />
3316             <link field="original_status" reltype="has_a" key="id" map="" class="ccs" />
3317             <link field="original_circ_modifier" reltype="has_a" key="code" map="" class="ccm" />
3318             <link field="original_location" reltype="has_a" key="id" map="" class="acpl" />
3319         </links>
3320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3321             <actions>
3322                 <create permission="MANAGE_RESERVES">
3323                                         <context link="course" field="owning_lib" />
3324                 </create>
3325                 <retrieve/>
3326                 <update permission="MANAGE_RESERVES">
3327                                         <context link="course" field="owning_lib" />
3328                 </update>
3329                 <delete permission="MANAGE_RESERVES">
3330                                         <context link="course" field="owning_lib" />
3331                 </delete>
3332             </actions>
3333         </permacrud>
3334     </class>
3335         <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">
3336                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_id_seq">
3337                         <field reporter:label="Term ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3338                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3339             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3340                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3341                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3342                         <field reporter:label="Courses" name="courses" reporter:datatype="link" oils_persist:virtual="true"/>
3343                         <field reporter:label="Course Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
3344                 </fields>
3345                 <links>
3346             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3347                         <link field="courses" reltype="has_many" key="term" map="course" class="acmtcm"/>
3348                         <link field="maps" reltype="has_many" key="term" map="" class="acmtcm"/>
3349                 </links>
3350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3351                         <actions>
3352                                 <create permission="MANAGE_RESERVES" context_field="owning_lib" />
3353                                 <retrieve/>
3354                                 <update permission="MANAGE_RESERVES" context_field="owning_lib" />
3355                                 <delete permission="MANAGE_RESERVES" context_field="owning_lib" />
3356                         </actions>
3357                 </permacrud>
3358         </class>
3359     <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">
3360         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_course_map_id_seq">
3361             <field reporter:label="Course Term Map ID" name="id" reporter:datatype="id"/>
3362             <field reporter:label="Term" name="term" oils_obj:required="true" reporter:datatype="link"/>
3363             <field reporter:label="Course" name="course" reporter:datatype="link" oils_obj:required="true"/>
3364         </fields>
3365         <links>
3366             <link field="term" reltype="has_a" key="id" map="" class="acmt"/>
3367             <link field="course" reltype="has_a" key="id" map="" class="acmc"/>
3368         </links>
3369         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3370             <actions>
3371                 <create permission="MANAGE_RESERVES">
3372                                         <context link="course" field="owning_lib" />
3373                 </create>
3374                 <retrieve/>
3375                 <update permission="MANAGE_RESERVES">
3376                                         <context link="course" field="owning_lib" />
3377                 </update>
3378                 <delete permission="MANAGE_RESERVES">
3379                                         <context link="course" field="owning_lib" />
3380                 </delete>
3381             </actions>
3382         </permacrud>
3383     </class>
3384         <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">
3385                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_role_id_seq">
3386                         <field reporter:label="Role ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3387                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3388             <field reporter:label="OPAC Viewable?" name="is_public" reporter:datatype="bool" />
3389                 </fields>
3390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3391                         <actions>
3392                                 <create permission="MANAGE_RESERVES" global_required="true" />
3393                                 <retrieve/>
3394                                 <update permission="MANAGE_RESERVES" global_required="true" />
3395                                 <delete permission="MANAGE_RESERVES" global_required="true" />
3396                         </actions>
3397                 </permacrud>
3398         </class>
3399         
3400     <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">
3401         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3402             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3403             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3404             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3405             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3406         </fields>
3407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3408             <actions>
3409                 <retrieve/>
3410             </actions>
3411         </permacrud>
3412     </class>
3413         <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">
3414                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3415                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3416                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3417                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3418                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3419                 </fields>
3420                 <links>
3421                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3422                 </links>
3423         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3424             <actions>
3425                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3426                 <retrieve/>
3427                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3428                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3429             </actions>
3430         </permacrud>
3431         </class>
3432         <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">
3433                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3434                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3435                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3436                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3437                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3438                 </fields>
3439                 <links>
3440                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3441                 </links>
3442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3443             <actions>
3444                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3445                 <retrieve/>
3446                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3447                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3448             </actions>
3449         </permacrud>
3450         </class>
3451         <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">
3452                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3453                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3454                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3455                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3456                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3457                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3458                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3459                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3460                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3461                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3462                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3463                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3464                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3465                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3466                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3467                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3468                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3469                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3470                         <field reporter:label="Dewey Classification" name="dewey" oils_persist:virtual="true" reporter:datatype="link"/>
3471                 </fields>
3472                 <links>
3473                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3474                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3475                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3476                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3477                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3478                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3479                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3480                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3481                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3482                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3483                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3484                         <link field="dewey" reltype="might_have" key="call_number" map="" class="racnd"/>
3485                 </links>
3486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3487             <actions>
3488                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3489                 <retrieve/>
3490                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3491                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3492             </actions>
3493         </permacrud>
3494         </class>
3495         <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">
3496                 <fields oils_persist:primary="call_number">
3497                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link" />
3498                         <field reporter:label="Dewey Number" name="dewey" reporter:datatype="text"/>
3499                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
3500                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
3501                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
3502                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
3503                 </fields>
3504                 <links>
3505                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3506                 </links>
3507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3508             <actions>
3509                 <retrieve/>
3510             </actions>
3511         </permacrud>
3512         </class>
3513         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3514                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3515                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3516                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3517                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3518                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3519                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3520                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3521                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3522                 </fields>
3523                 <links>
3524                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3525                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3526         </links>
3527         </class>
3528         <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">
3529                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3530                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3531                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3532                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3533                 </fields>
3534                 <links>
3535                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3536                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3537                 </links>
3538         </class>
3539         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3540                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3541                         <field name="id" reporter:datatype="id" />
3542                         <field name="value" oils_persist:i18n="true" />
3543                 </fields>
3544                 <links/>
3545         </class>
3546         <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">
3547                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3548                         <field name="balance_owed" reporter:datatype="money" />
3549                         <field name="total_owed" reporter:datatype="money" />
3550                         <field name="total_paid" reporter:datatype="money" />
3551                         <field name="usr" reporter:datatype="link"/>
3552                 </fields>
3553                 <links>
3554                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3555         </links>
3556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3557             <actions>
3558                 <retrieve permission="VIEW_USER">
3559                     <context link="usr" field="home_ou"/>
3560                 </retrieve>
3561             </actions>
3562         </permacrud>
3563         </class>
3564         <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">
3565                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3566                         <field name="balance_owed" reporter:datatype="money" />
3567                         <field name="total_owed" reporter:datatype="money" />
3568                         <field name="total_paid" reporter:datatype="money" />
3569                         <field name="usr" reporter:datatype="link"/>
3570                 </fields>
3571                 <links>
3572                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3573         </links>
3574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3575             <actions>
3576                 <retrieve permission="VIEW_USER">
3577                     <context link="usr" field="home_ou"/>
3578                 </retrieve>
3579             </actions>
3580         </permacrud>
3581         </class>
3582         <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">
3583                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3584                         <field name="collector" />
3585                         <field name="enter_time" reporter:datatype="timestamp"/>
3586                         <field name="id" reporter:datatype="id" />
3587                         <field name="location" reporter:datatype="link"/>
3588                         <field name="usr" reporter:datatype="link"/>
3589                 </fields>
3590                 <links>
3591                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3592                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3593                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3594                 </links>
3595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3596             <actions>
3597                 <create permission="money.collections_tracker.create" context_field="location"/>
3598                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3599                 <delete permission="money.collections_tracker.create" context_field="location"/>
3600             </actions>
3601         </permacrud>
3602         </class>
3603         <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">
3604                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3605                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3607                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3608                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3609                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3610                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3611                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3612                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3613                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3614                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3615                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3616                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3617                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3618                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3619                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3620                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3621                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3622                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3623                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3624                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3625                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3626                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3627                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3628                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3629                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3630                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3641                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3642                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3643                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3644                 </fields>
3645                 <links>
3646                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3647                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3648                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3649                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3650                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3651                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3652                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3653                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3654                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3655                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3656                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3657                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3658                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3659                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3660                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3661                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3662                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3663                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3664                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3665                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3666                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3667                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3668                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3669                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3670                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3671                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3672                 </links>
3673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3674             <actions>
3675                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3676                 <retrieve/>
3677                 <update permission="UPDATE_MARC" global_required="true"/>
3678                 <!-- 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. -->
3679                 <delete permission="DELETE_RECORD" global_required="true"/>
3680             </actions>
3681         </permacrud>
3682         </class>
3683         <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">
3684                 <fields oils_persist:primary="id">
3685                         <field name="dow_0_close" />
3686                         <field name="dow_0_open" />
3687                         <field name="dow_1_close" />
3688                         <field name="dow_1_open" />
3689                         <field name="dow_2_close" />
3690                         <field name="dow_2_open" />
3691                         <field name="dow_3_close" />
3692                         <field name="dow_3_open" />
3693                         <field name="dow_4_close" />
3694                         <field name="dow_4_open" />
3695                         <field name="dow_5_close" />
3696                         <field name="dow_5_open" />
3697                         <field name="dow_6_close" />
3698                         <field name="dow_6_open" />
3699                         <field name="id" reporter:datatype="id" />
3700                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3701                 </fields>
3702                 <links>
3703                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3704                 </links>
3705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3706             <actions>
3707                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3708                 <retrieve/>
3709                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3710                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3711             </actions>
3712         </permacrud>
3713         </class>
3714         <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">
3715                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3716                         <field name="id" reporter:datatype="id" />
3717                         <field name="record" reporter:datatype="link"/>
3718                         <field name="label" reporter:datatype="text"/>
3719                         <field name="label_sortkey" reporter:datatype="text"/>
3720                         <field name="deleted" reporter:datatype="bool"/>
3721                 </fields>
3722                 <links>
3723                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3724                 </links>
3725         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3726             <actions>
3727                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3728                 <retrieve/>
3729                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3730                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3731             </actions>
3732         </permacrud>
3733         </class>
3734         <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">
3735                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3736                         <field name="id" reporter:datatype="id" />
3737                         <field name="target_copy" reporter:datatype="link" />
3738                         <field name="part" reporter:datatype="link"/>
3739                 </fields>
3740                 <links>
3741                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3742                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3743                 </links>
3744         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3745             <actions>
3746                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3747                 <retrieve/>
3748                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3749                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3750             </actions>
3751         </permacrud>
3752         </class>
3753     <class  id="aecc"
3754             controller="open-ils.cstore open-ils.pcrud"
3755             oils_obj:fieldmapper="action::emergency_closing_circulation"
3756             oils_persist:tablename="action.emergency_closing_circulation"
3757             reporter:label="Emergency Closing Circulation Entry"
3758             oils_persist:readonly="true"
3759     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3760         <fields oils_persist:primary="id">
3761             <field name="id" reporter:datatype="id" />
3762             <field name="circulation" reporter:datatype="link" />
3763                         <field name="emergency_closing" reporter:datatype="link"/>
3764             <field name="original_due_date" reporter:datatype="timestamp" />
3765             <field name="process_time" reporter:datatype="timestamp" />
3766         </fields>
3767         <links>
3768             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3769             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3770         </links>
3771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3772             <actions>
3773                 <retrieve/>
3774             </actions>
3775         </permacrud>
3776     </class>
3777     <class  id="aecr"
3778             controller="open-ils.cstore open-ils.pcrud"
3779             oils_obj:fieldmapper="action::emergency_closing_reservation"
3780             oils_persist:tablename="action.emergency_closing_reservation"
3781             reporter:label="Emergency Closing Reservation Entry"
3782             oils_persist:readonly="true"
3783     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3784         <fields oils_persist:primary="id">
3785             <field name="id" reporter:datatype="id" />
3786             <field name="reservation" reporter:datatype="link" />
3787                         <field name="emergency_closing" reporter:datatype="link"/>
3788             <field name="original_end_time" reporter:datatype="timestamp" />
3789             <field name="process_time" reporter:datatype="timestamp" />
3790         </fields>
3791         <links>
3792             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3793             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3794         </links>
3795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3796             <actions>
3797                 <retrieve/>
3798             </actions>
3799         </permacrud>
3800     </class>
3801     <class  id="aech"
3802             controller="open-ils.cstore open-ils.pcrud"
3803             oils_obj:fieldmapper="action::emergency_closing_hold"
3804             oils_persist:tablename="action.emergency_closing_hold"
3805             reporter:label="Emergency Closing Hold Entry"
3806             oils_persist:readonly="true"
3807     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3808         <fields oils_persist:primary="id">
3809             <field name="id" reporter:datatype="id" />
3810             <field name="hold" reporter:datatype="link" />
3811                         <field name="emergency_closing" reporter:datatype="link"/>
3812             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3813             <field name="process_time" reporter:datatype="timestamp" />
3814         </fields>
3815         <links>
3816             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3817             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3818         </links>
3819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3820             <actions>
3821                 <retrieve/>
3822             </actions>
3823         </permacrud>
3824     </class>
3825     <class  id="aecs"
3826             controller="open-ils.cstore open-ils.pcrud"
3827             oils_obj:fieldmapper="action::emergency_closing_status"
3828             oils_persist:tablename="action.emergency_closing_status"
3829             reporter:label="Emergency Closing Status"
3830             oils_persist:readonly="true"
3831     >
3832         <fields oils_persist:primary="id">
3833             <field name="id" reporter:datatype="id" />
3834             <field name="creator" reporter:datatype="link" />
3835             <field name="create_time" reporter:datatype="timestamp" />
3836             <field name="process_start_time" reporter:datatype="timestamp" />
3837             <field name="process_end_time" reporter:datatype="timestamp" />
3838             <field name="last_update_time" reporter:datatype="timestamp" />
3839             <field name="circulations" reporter:datatype="int" />
3840             <field name="circulations_complete" reporter:datatype="int" />
3841             <field name="reservations" reporter:datatype="int" />
3842             <field name="reservations_complete" reporter:datatype="int" />
3843             <field name="holds" reporter:datatype="int" />
3844             <field name="holds_complete" reporter:datatype="int" />
3845         </fields>
3846         <links>
3847             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3848         </links>
3849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3850             <actions>
3851                 <retrieve/>
3852             </actions>
3853         </permacrud>
3854     </class>
3855     <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">
3856         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3857             <field name="id" reporter:datatype="id" />
3858             <field name="creator" reporter:datatype="link" />
3859             <field name="create_time" reporter:datatype="timestamp" />
3860             <field name="process_start_time" reporter:datatype="timestamp" />
3861             <field name="process_end_time" reporter:datatype="timestamp" />
3862             <field name="last_update_time" reporter:datatype="timestamp" />
3863             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3864             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3865             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3866             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3867             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3868         </fields>
3869         <links>
3870             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3871             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3872             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3873             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3874             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3875             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3876         </links>
3877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3878             <actions>
3879                 <create permission="EMERGENCY_CLOSING">
3880                     <context link="closing" field="org_unit" />
3881                 </create>
3882                 <retrieve/>
3883                 <update permission="EMERGENCY_CLOSING">
3884                     <context link="closing" field="org_unit" />
3885                 </update>
3886                 <delete permission="EMERGENCY_CLOSING">
3887                     <context link="closing" field="org_unit" />
3888                 </delete>
3889             </actions>
3890         </permacrud>
3891     </class>
3892         <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">
3893                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3894                         <field name="close_end" reporter:datatype="timestamp" />
3895                         <field name="close_start" reporter:datatype="timestamp" />
3896                         <field name="id" reporter:datatype="id" />
3897                         <field name="org_unit" reporter:datatype="org_unit"/>
3898                         <field name="reason" reporter:datatype="text"/>
3899                         <field name="full_day" reporter:datatype="bool"/>
3900                         <field name="multi_day" reporter:datatype="bool"/>
3901                         <field name="emergency_closing" reporter:datatype="link"/>
3902                 </fields>
3903                 <links>
3904                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3905                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3906                 </links>
3907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3908             <actions>
3909                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3910                 <retrieve/>
3911                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3912                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3913             </actions>
3914         </permacrud>
3915         </class>
3916         <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">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3918                         <field name="extended" reporter:datatype="interval"/>
3919                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3920                         <field name="max_renewals" reporter:datatype="int" />
3921                         <field name="name" reporter:datatype="text"/>
3922                         <field name="normal" reporter:datatype="interval"/>
3923                         <field name="shrt" reporter:datatype="interval"/>
3924                         <field name="max_auto_renewals" reporter:datatype="int" />
3925                 </fields>
3926                 <links>
3927                 </links>
3928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3929             <actions>
3930                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3931                 <retrieve/>
3932                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3933                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3934             </actions>
3935         </permacrud>
3936         </class>
3937
3938         <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">
3939                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3940                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3941                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3942             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3943                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3944             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3945                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3946                                 reporter:datatype="link" config_field="true"/>
3947                 </fields>
3948                 <links>
3949             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3950                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3951                 </links>
3952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3953             <actions>
3954                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3955                 <retrieve/>
3956                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3957                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3958             </actions>
3959                 </permacrud>
3960         </class>
3961
3962         <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">
3963                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3964                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3965                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3966                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3967             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3968                 </fields>
3969                 <links>
3970                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3971                 </links>
3972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3973             <actions>
3974                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3975                 <retrieve/>
3976                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3977                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3978             </actions>
3979                 </permacrud>
3980         </class>
3981
3982         <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">
3983                 <fields oils_persist:primary="id" oils_persist:sequence="">
3984                         <field name="balance_owed" reporter:datatype="money"/>
3985                         <field name="id" reporter:datatype="id" />
3986                         <field name="last_billing_note" reporter:datatype="text"/>
3987                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3988                         <field name="last_billing_type" reporter:datatype="text"/>
3989                         <field name="last_payment_note" reporter:datatype="text"/>
3990                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3991                         <field name="last_payment_type" reporter:datatype="text"/>
3992                         <field name="total_owed" reporter:datatype="money"/>
3993                         <field name="total_paid" reporter:datatype="money"/>
3994                         <field name="usr" reporter:datatype="link"/>
3995                         <field name="xact_finish" reporter:datatype="timestamp" />
3996                         <field name="xact_start" reporter:datatype="timestamp" />
3997                         <field name="xact_type" reporter:datatype="text"/>
3998                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3999                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4000                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4001                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
4002                         <field name="billing_location" reporter:datatype="link"/>
4003                 </fields>
4004                 <links>
4005                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4006                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
4007                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4008                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4009                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
4010                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4011                 </links>
4012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4013                         <actions>
4014                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4015                                         <context link="usr" field="home_ou" />
4016                                 </retrieve>
4017                         </actions>
4018                 </permacrud>
4019         </class>
4020         <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">
4021                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
4022                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4023                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
4024                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
4025                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4026                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
4027                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4028                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
4029                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4030                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
4031                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4032                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
4033                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
4034                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4035                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
4036                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
4037                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
4038                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
4039                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
4040                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4041                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
4042                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
4043                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
4044                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
4045                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
4046                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
4047                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
4048                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
4049                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
4050                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
4051                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
4052                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
4053                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
4054                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
4055                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4056                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4057                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
4058                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
4059                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
4060                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
4061                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
4062                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
4063                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
4064                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
4065                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
4066                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
4067                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
4068                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
4069                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
4070                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
4071                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
4072                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
4073                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
4074                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
4075                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
4076                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
4077                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
4078                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
4079                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
4080                         <field reporter:label="Name Keyword internal tsvector" name="name_kw_tsvector" reporter:datatype="text"/>
4081                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
4082                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4083                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4084                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
4085                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
4086                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4088                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4089                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4090                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4091                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
4092                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
4093                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
4094                 </fields>
4095                 <links>
4096                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
4097                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
4098                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
4099                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
4100                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
4101                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
4102                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
4103                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
4104                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
4105                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
4106                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
4107                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
4108                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
4109                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
4110                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
4111                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
4112                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
4113                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
4114                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
4115                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
4116                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
4117                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
4118                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
4119                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
4120                         <link field="notes" reltype="has_many" key="usr" map="" class="aum"/>
4121                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
4122                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
4123                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
4124                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
4125                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
4126                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
4127                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
4128                 </links>
4129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4130                         <actions>
4131                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
4132                         </actions>
4133                 </permacrud>
4134         </class>
4135         <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">
4136                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
4137                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
4138                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
4139                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
4140                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
4141                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
4142                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
4143                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
4144                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
4145         </fields>
4146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4147                         <actions>
4148                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4149                                 <retrieve/>
4150                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4151                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4152                         </actions>
4153                 </permacrud>
4154         </class>
4155         <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">
4156                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
4157                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4158                         <field name="usr" reporter:label="User" reporter:datatype="link" />
4159                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
4160                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
4161         </fields>
4162         <links>
4163                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4164                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
4165                 </links>
4166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4167                         <actions>
4168                                 <retrieve permission="RUN_REPORTS">
4169                                         <context link="usr" field="home_ou" />
4170                                 </retrieve>
4171                         </actions>
4172                 </permacrud>
4173         </class>
4174         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
4175                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
4176                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4177                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
4178                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
4179                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
4180                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
4181                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
4182         </fields>
4183         <links>
4184                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
4185                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
4186                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
4187                 </links>
4188                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4189                         <actions>
4190                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
4191                                         <context link="usr" field="home_ou" />
4192                                         <context link="ws" field="owning_lib" />
4193                                 </retrieve>
4194                                 <create permission="ADMIN_TOOLBAR" context_field="org">
4195                                         <context link="usr" field="home_ou" />
4196                                         <context link="ws" field="owning_lib" />
4197                                 </create>
4198                                 <update permission="ADMIN_TOOLBAR" context_field="org">
4199                                         <context link="usr" field="home_ou" />
4200                                         <context link="ws" field="owning_lib" />
4201                                 </update>
4202                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
4203                                         <context link="usr" field="home_ou" />
4204                                         <context link="ws" field="owning_lib" />
4205                                 </delete>
4206                         </actions>
4207                 </permacrud>
4208         </class>
4209         <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">
4210                 <fields oils_persist:primary="name">
4211                         <field name="name" reporter:datatype="text"/>
4212                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4213                 </fields>
4214                 <links/>
4215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4216                         <actions>
4217                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4218                                 <retrieve/>
4219                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4220                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4221                         </actions>
4222                 </permacrud>
4223         </class>
4224         <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">
4225                 <fields oils_persist:primary="name">
4226                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
4227                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
4228                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
4229                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
4230                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
4231                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
4232                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
4233                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
4234                 </fields>
4235                 <links>
4236                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
4237                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4238                 </links>
4239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4240                         <actions>
4241                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4242                                 <retrieve/>
4243                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4244                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4245                         </actions>
4246                 </permacrud>
4247         </class>
4248         <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">
4249                 <fields oils_persist:primary="name">
4250                         <field name="name" reporter:datatype="text"/>
4251                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4252                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4253                         <field name="datatype" reporter:datatype="text"/>
4254                         <field name="view_perm" reporter:datatype="link"/>
4255                         <field name="update_perm" reporter:datatype="link"/>
4256                         <field name="fm_class" reporter:datatype="text"/>
4257                         <field name="grp" reporter:datatype="link"/>
4258                 </fields>
4259                 <links>
4260                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
4261                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
4262                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
4263                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4264                 </links>
4265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4266                         <actions>
4267                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4268                                 <retrieve/>
4269                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4270                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4271                         </actions>
4272                 </permacrud>
4273         </class>
4274         <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">
4275                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
4276                         <field name="id" />
4277                         <field name="name"  reporter:datatype="text"/>
4278                         <field name="org_unit" reporter:datatype="org_unit"/>
4279                         <field name="value"  reporter:datatype="text"/>
4280                 </fields>
4281                 <links>
4282                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4283                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
4284                 </links>
4285         </class>
4286         <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">
4287                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
4288                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4289                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
4290                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
4291                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
4292                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
4293                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
4294                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
4295                 </fields>
4296                 <links>
4297                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4298                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4299                 </links>
4300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4301             <actions>
4302                 <create permission="CREATE_COPY_NOTE">
4303                     <context link="owning_copy" field="circ_lib"/>
4304                 </create>
4305                 <retrieve permission="VIEW_COPY_NOTES">
4306                     <context link="owning_copy" field="circ_lib"/>
4307                 </retrieve>
4308                 <update permission="UPDATE_COPY_NOTE">
4309                     <context link="owning_copy" field="circ_lib"/>
4310                 </update>
4311                 <delete permission="DELETE_COPY_NOTE">
4312                     <context link="owning_copy" field="circ_lib"/>
4313                 </delete>
4314             </actions>
4315         </permacrud>
4316         </class>
4317         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
4318                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
4319                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
4320                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
4321                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
4322                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4323                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
4324                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
4325                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
4326                 </fields>
4327                 <links>
4328                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4329                 </links>
4330         </class>
4331         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
4332                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
4333                         <field name="fingerprint"  reporter:datatype="text"/>
4334                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
4335                         <field name="master_record" reporter:datatype="link"/>
4336                         <field name="mods"  reporter:datatype="text"/>
4337                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
4338                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4339                 </fields>
4340                 <links>
4341                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
4342                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
4343                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
4344                 </links>
4345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4346                         <actions>
4347                                 <retrieve/>
4348                         </actions>
4349                 </permacrud>
4350         </class>
4351         <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">
4352                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
4353                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4354                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4355                 </fields>
4356                 <links/>
4357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4358             <actions>
4359                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
4360                 <retrieve/>
4361                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
4362                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
4363             </actions>
4364         </permacrud>
4365         </class>
4366         <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">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
4368                         <field name="code"  reporter:datatype="text"/>
4369                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
4370                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
4371                 </fields>
4372                 <links/>
4373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4374             <actions>
4375                 <create permission="CREATE_PERM" global_required="true"/>
4376                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
4377                 <update permission="UPDATE_PERM" global_required="true"/>
4378                 <delete permission="DELETE_PERM" global_required="true"/>
4379             </actions>
4380         </permacrud>
4381         </class>
4382         <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">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
4384                         <field name="id" reporter:datatype="id" />
4385                         <field name="metarecord" reporter:datatype="link"/>
4386                         <field name="source" reporter:datatype="link"/>
4387                 </fields>
4388                 <links>
4389                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4390                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4391                 </links>
4392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4393                         <actions>
4394                                 <retrieve/>
4395                         </actions>
4396                 </permacrud>
4397         </class>
4398         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4399                         oils_obj:fieldmapper="metabib::display_entry" 
4400                         oils_persist:tablename="metabib.display_entry" 
4401                         oils_persist:field_safe="true"
4402                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4403                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4404                         <field name="id" reporter:datatype="id" />
4405                         <field name="field" reporter:datatype="link"/>
4406                         <field name="source" reporter:datatype="link"/>
4407                         <field name="value"  reporter:datatype="text"/>
4408                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4409                 </fields>
4410                 <links>
4411                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4412                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4413                 </links>
4414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4415                         <actions>
4416                                 <retrieve/>
4417                         </actions>
4418                 </permacrud>
4419         </class>
4420         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4421                 oils_persist:tablename="metabib.flat_display_entry"
4422                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4423                 oils_persist:field_safe="true"
4424                 reporter:label="Flat Display Entry" 
4425                 oils_persist:readonly="true">
4426                 <fields>
4427                         <field name="source" reporter:datatype="id" />
4428                         <field name="name" reporter:datatype="text"/>
4429                         <field name="multi" reporter:datatype="bool"/>
4430                         <field name="label" reporter:datatype="text"/>
4431                         <field name="field" reporter:datatype="link"/>
4432                         <field name="value" reporter:datatype="text"/>
4433                 </fields>
4434                 <links>
4435                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4436                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4437                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4438                 </links>
4439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4440                         <actions>
4441                                 <retrieve/>
4442                         </actions>
4443                 </permacrud>
4444         </class>
4445         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4446                 oils_persist:tablename="metabib.compressed_display_entry"
4447                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4448                 oils_persist:field_safe="true"
4449                 reporter:label="Compressed Display Entry" 
4450                 oils_persist:readonly="true">
4451                 <fields>
4452                         <field name="source" reporter:datatype="id" />
4453                         <field name="name" reporter:datatype="text"/>
4454                         <field name="multi" reporter:datatype="bool"/>
4455                         <field name="label" reporter:datatype="text"/>
4456                         <field name="field" reporter:datatype="link"/>
4457                         <field name="value" reporter:datatype="text"/>
4458                 </fields>
4459                 <links>
4460                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4461                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4462                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4463                 </links>
4464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4465                         <actions>
4466                                 <retrieve/>
4467                         </actions>
4468                 </permacrud>
4469         </class>
4470         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4471                 oils_persist:tablename="metabib.wide_display_entry"
4472                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4473                 oils_persist:field_safe="true"
4474                 reporter:label="Wide Display Entry" 
4475                 oils_persist:readonly="true">
4476                 <fields oils_persist:primary="source">
4477                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4478                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4479                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4480                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4481                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4482                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4483                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4484                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4485                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4486                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4487                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4488                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4489                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4490                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4491                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4492                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4493                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4494                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4495                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4496                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4497                 </fields>
4498                 <links>
4499                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4500                 </links>
4501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4502                         <actions>
4503                                 <retrieve/>
4504                         </actions>
4505                 </permacrud>
4506         </class>
4507
4508         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4509                 oils_persist:tablename="config.display_field_map"
4510                 oils_obj:fieldmapper="config::display_field_map"
4511                 oils_persist:field_safe="true"
4512                 reporter:label="Display Field Map">
4513                 <fields oils_persist:primary="name">
4514                         <field name="name" reporter:datatype="text"/>
4515                         <field name="field" reporter:datatype="link"/>
4516                         <field name="multi" reporter:datatype="bool"/>
4517                 </fields>
4518                 <links>
4519                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4520                 </links>
4521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4522                         <actions>
4523                                 <retrieve/>
4524                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4525                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4526                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4527                         </actions>
4528                 </permacrud>
4529         </class>
4530
4531         <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">
4532                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4533                         <field name="id" reporter:datatype="id" />
4534                         <field name="field" reporter:datatype="link"/>
4535                         <field name="source" reporter:datatype="link"/>
4536                         <field name="value"  reporter:datatype="text"/>
4537                 </fields>
4538                 <links>
4539                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4540                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4541                 </links>
4542         </class>
4543         <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">
4544                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4545                         <field name="id" reporter:datatype="id" />
4546                         <field name="value" reporter:datatype="text"/>
4547                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4548                 </fields>
4549                 <links>
4550                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4551                 </links>
4552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4553                         <actions>
4554                                 <retrieve/>
4555                         </actions>
4556                 </permacrud>
4557         </class>
4558         <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">
4559                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4560                         <field name="id" reporter:datatype="id" />
4561                         <field name="entry" reporter:datatype="link"/>
4562                         <field name="def" reporter:datatype="link"/>
4563                         <field name="source" reporter:datatype="link"/>
4564                 </fields>
4565                 <links>
4566                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4567                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4568                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4569                 </links>
4570         </class>
4571         <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">
4572                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4573                         <field name="id" reporter:datatype="id" />
4574                         <field name="entry" reporter:datatype="link"/>
4575                         <field name="simple_heading" reporter:datatype="link"/>
4576                 </fields>
4577                 <links>
4578                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4579                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4580                 </links>
4581         </class>
4582         <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">
4583                 <oils_persist:source_definition><![CDATA[
4584                         SELECT * FROM metabib.author_field_entry
4585                                                 UNION ALL
4586                         SELECT * FROM metabib.keyword_field_entry
4587                                                 UNION ALL
4588                         SELECT * FROM metabib.identifier_field_entry
4589                                                 UNION ALL
4590                         SELECT * FROM metabib.title_field_entry
4591                                                 UNION ALL
4592                         SELECT * FROM metabib.subject_field_entry
4593                                                 UNION ALL
4594                         SELECT * FROM metabib.series_field_entry
4595                 ]]></oils_persist:source_definition>
4596                 <fields>
4597                         <field name="field" reporter:datatype="link"/>
4598                         <field name="id" reporter:datatype="id" />
4599                         <field name="source" reporter:datatype="link"/>
4600                         <field name="value"  reporter:datatype="text"/>
4601                 </fields>
4602                 <links>
4603                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4604                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4605                 </links>
4606         </class>
4607         <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">
4608                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4609                         <field name="field" reporter:datatype="link"/>
4610                         <field name="id" reporter:datatype="id" />
4611                         <field name="source" reporter:datatype="link"/>
4612                         <field name="value"  reporter:datatype="text"/>
4613                 </fields>
4614                 <links>
4615                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4616                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4617                 </links>
4618         </class>
4619         <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">
4620                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4621                         <field name="accepting_usr" reporter:datatype="link"/>
4622                         <field name="amount" reporter:datatype="money" />
4623                         <field name="amount_collected" reporter:datatype="money" />
4624                         <field name="cash_drawer" reporter:datatype="link"/>
4625                         <field name="id" reporter:datatype="id" />
4626                         <field name="note"  reporter:datatype="text"/>
4627                         <field name="payment_ts" reporter:datatype="timestamp"/>
4628                         <field name="xact" reporter:datatype="link"/>
4629                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4630                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4631                 </fields>
4632                 <links>
4633                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4634                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4635                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4636                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4637                 </links>
4638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4639             <actions>
4640                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4641                     <context link="xact" jump="usr" field="home_ou"/>
4642                 </retrieve>
4643                         </actions>
4644                 </permacrud>
4645         </class>
4646         <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">
4647                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4648                         <field name="accepting_usr" reporter:datatype="link"/>
4649                         <field name="amount" reporter:datatype="money" />
4650                         <field name="amount_collected" reporter:datatype="money" />
4651                         <field name="id" reporter:datatype="id" />
4652                         <field name="note"  reporter:datatype="text"/>
4653                         <field name="payment_ts" reporter:datatype="timestamp"/>
4654                         <field name="xact" reporter:datatype="link"/>
4655                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4656                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4657                 </fields>
4658                 <links>
4659                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4660                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4661                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4662                 </links>
4663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4664             <actions>
4665                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4666                     <context link="xact" jump="usr" field="home_ou"/>
4667                 </retrieve>
4668                         </actions>
4669                 </permacrud>
4670         </class>
4671         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4672                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4673                         <field name="accepting_usr" reporter:datatype="link"/>
4674                         <field name="amount" reporter:datatype="money" />
4675                         <field name="amount_collected" reporter:datatype="money" />
4676                         <field name="id" reporter:datatype="id" />
4677                         <field name="note"  reporter:datatype="text"/>
4678                         <field name="payment_ts" reporter:datatype="timestamp"/>
4679                         <field name="xact" reporter:datatype="link"/>
4680                         <field name="billing" reporter:datatype="link"/>
4681                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4682                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4683                 </fields>
4684                 <links>
4685                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4686                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4687                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4688                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4689                 </links>
4690         </class>
4691         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4692                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4693                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4694                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4695                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4696                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4697                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4698                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4699                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4700                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4701                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4702                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4703                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4704                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4705                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4706                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4707                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4708                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4709                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4710                 </fields>
4711                 <links>
4712                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4713                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4714                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4715                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4716                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4717                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4718                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4719                 </links>
4720         </class>
4721
4722         <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">
4723                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4724                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4725                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4726                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4727                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4728                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4729                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4730                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4731                 </fields>
4732                 <links/>
4733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4734             <actions>
4735                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4736                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4737                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4738                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4739             </actions>
4740         </permacrud>
4741         </class>
4742         <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">
4743                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4744                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4745                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4746                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4747                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4748                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4749                 </fields>
4750                 <links>
4751                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4752                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4753                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4754         </links>
4755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4756             <actions>
4757                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4758                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4759                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4760                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4761             </actions>
4762         </permacrud>
4763         </class>
4764         <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">
4765                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4766                         <field name="holdable" reporter:datatype="bool" reporter:label="Holdable"/>
4767                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4768                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
4769                         <field name="opac_visible" reporter:datatype="bool" reporter:label="OPAC Visible"/>
4770             <field name="copy_active" reporter:datatype="bool" reporter:label="Sets Item Active"/>
4771             <field name="restrict_copy_delete" reporter:datatype="bool" reporter:label="Restrict Deletion"/>
4772             <field name="is_available" reporter:datatype="bool" reporter:label="Available"/>
4773             <field name="hopeless_prone" reporter:datatype="bool" reporter:label="Prone to Hopeless Holds?"/>
4774                 </fields>
4775                 <links/>
4776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4777             <actions>
4778                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4779                 <retrieve/>
4780                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4781                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4782             </actions>
4783         </permacrud>
4784         </class>
4785         <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">
4786                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
4787                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4788                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4789                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4790                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4791                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4792                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4793                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4794                         <field name="usr_message" reporter:datatype="link" reporter:label="User Message"/>
4795                 </fields>
4796                 <links>
4797                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4798                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4799                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4800                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4801                         <link field="usr_message" reltype="has_a" key="id" map="" class="aum"/>
4802                 </links>
4803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4804                         <actions>
4805                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4806                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4807                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4808                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4809                         </actions>
4810                 </permacrud>
4811         </class>
4812         <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">
4813                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4814                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4815                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4816                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4817                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4818                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4819                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4820                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4821                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4822                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4823                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4824                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4825                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4826                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4827                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4828                 </fields>
4829                 <links>
4830                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4831                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4832                 </links>
4833                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4834                         <actions>
4835                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4836                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4837                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4838                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4839                         </actions>
4840                 </permacrud>
4841         </class>
4842         <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">
4843                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4844                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4845                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4846                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4847                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4848                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4849                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4850                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4851                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4852                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4853                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4854                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4855                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4856                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4857                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4858                 </fields>
4859                 <links>
4860                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4861                 </links>
4862                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4863                         <actions>
4864                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4865                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4866                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4867                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4868                         </actions>
4869                 </permacrud>
4870         </class>
4871
4872
4873         <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">
4874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4875                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4876                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4877                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4878                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4879                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4880                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4881                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4882                 </fields>
4883                 <links>
4884                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4885                 </links>
4886         </class>
4887
4888         <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">
4889                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4890                         <field name="call_number" />
4891                         <field name="create_date" reporter:datatype="timestamp"/>
4892                         <field name="creator" reporter:datatype="link"/>
4893                         <field name="id" reporter:datatype="id" />
4894                         <field name="pub" reporter:datatype="bool"/>
4895                         <field name="title"  reporter:datatype="text"/>
4896                         <field name="value"  reporter:datatype="text"/>
4897                 </fields>
4898                 <links>
4899                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4900                 </links>
4901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4902             <actions>
4903                 <create permission="CREATE_VOLUME_NOTE">
4904                     <context link="call_number" field="owning_lib"/>
4905                 </create>
4906                 <retrieve permission="VIEW_VOLUME_NOTES">
4907                     <context link="call_number" field="owning_lib"/>
4908                 </retrieve>
4909                 <update permission="UPDATE_VOLUME_NOTE">
4910                     <context link="call_number" field="owning_lib"/>
4911                 </update>
4912                 <delete permission="DELETE_VOLUME_NOTE">
4913                     <context link="call_number" field="owning_lib"/>
4914                 </delete>
4915             </actions>
4916         </permacrud>
4917         </class>
4918         <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">
4919                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4920                         <field name="create_date" reporter:datatype="timestamp"/>
4921                         <field name="creator" reporter:datatype="link"/>
4922                         <field name="edit_date" reporter:datatype="timestamp"/>
4923                         <field name="editor" reporter:datatype="link"/>
4924                         <field name="id" reporter:datatype="id" />
4925                         <field name="record" reporter:datatype="link"/>
4926                         <field name="value" reporter:datatype="text"/>
4927                 </fields>
4928                 <links>
4929                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4930                 </links>
4931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4932             <actions>
4933                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4934                 <retrieve/>
4935                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4936                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4937             </actions>
4938         </permacrud>
4939         </class>
4940         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4941         <oils_persist:source_definition><![CDATA[
4942 SELECT  usr,
4943         SUM(
4944             CASE
4945                 WHEN (
4946                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4947                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4948                 ) THEN 1
4949                 ELSE 0
4950             END
4951         ) AS out,
4952
4953         SUM(
4954             CASE
4955                 WHEN (
4956                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4957                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4958                 ) THEN 1
4959                 ELSE 0
4960             END
4961         ) AS overdue,
4962
4963         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4964         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4965         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4966   FROM  action.circulation
4967   WHERE checkin_time IS NULL
4968   GROUP BY 1
4969         ]]></oils_persist:source_definition>
4970         <fields oils_persist:primary="usr">
4971             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4972             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4973             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4974             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4975             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4976             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4977         </fields>
4978         <links>
4979             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4980         </links>
4981         </class>
4982         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4983         <oils_persist:source_definition><![CDATA[
4984 SELECT  usr,
4985         STRING_AGG(
4986             CASE
4987                 WHEN (
4988                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4989                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4990                 ) THEN id::TEXT
4991                 ELSE '0'
4992             END
4993         ,',') AS out,
4994
4995         STRING_AGG(
4996             CASE
4997                 WHEN (
4998                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4999                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
5000                 ) THEN id::TEXT
5001                 ELSE '0'
5002             END
5003         ,',') AS overdue,
5004
5005         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
5006         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
5007         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
5008   FROM  action.circulation
5009   WHERE checkin_time IS NULL
5010   GROUP BY 1
5011         ]]></oils_persist:source_definition>
5012         <fields oils_persist:primary="usr">
5013             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
5014             <field reporter:label="Out" name="out" reporter:datatype="text"/>
5015             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
5016             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
5017             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
5018             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
5019         </fields>
5020         <links>
5021             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5022         </links>
5023         </class>
5024         <class id="acsp" controller="open-ils.cstore" oils_obj:fieldmapper="action::curbside" oils_persist:tablename="action.curbside" reporter:label="Curbside Appointment Slot">
5025                 <fields oils_persist:primary="id" oils_persist:sequence="action.curbside_id_seq">
5026                         <field reporter:label="Appointment ID" name="id" reporter:datatype="id" />
5027                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5028                         <field reporter:label="Pickup Library" name="org" reporter:datatype="org_unit"/>
5029                         <field reporter:label="Appointment Date/Time" name="slot" reporter:datatype="timestamp"/>
5030                         <field reporter:label="Staged" name="staged" reporter:datatype="timestamp"/>
5031                         <field reporter:label="Staging Staff" name="stage_staff" reporter:datatype="link"/>
5032                         <field reporter:label="Arrival Date/Time" name="arrival" reporter:datatype="timestamp"/>
5033                         <field reporter:label="Delivery Date/Time" name="delivered" reporter:datatype="timestamp"/>
5034                         <field reporter:label="Delivery Staff" name="delivery_staff" reporter:datatype="link"/>
5035                         <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
5036                 </fields>
5037                 <links>
5038                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5039                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5040                         <link field="stage_staff" reltype="has_a" key="id" map="" class="au"/>
5041                         <link field="delivery_staff" reltype="has_a" key="id" map="" class="au"/>
5042                 </links>
5043         </class>
5044         <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">
5045                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5046                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5047                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5048                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5049                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
5050                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5051                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5052                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5053                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5054                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5055                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5056                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5057                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5058                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5059                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5060                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5061                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5062                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5063                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5064                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5065                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5066                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5067                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5068                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5069                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5070                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5071                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5072                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5073                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5074                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5075                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5076                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5077                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5078                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5079                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5080                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5081                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5082                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5083                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5084                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5085                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5086                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5087                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5088                 </fields>
5089                 <links>
5090                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5091                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5092                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5093                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5094                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5095                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5096                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5097                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5098                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5099                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5100                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5101                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5102                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5103                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5104                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5105                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5106                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5107                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
5108                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5109                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5110                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5111                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5112                 </links>
5113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5114                         <actions>
5115                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5116                         </actions>
5117                 </permacrud>
5118         </class>
5119         <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">
5120                 <fields>
5121                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5122                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5123                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
5124                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5125                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
5126                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5127                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
5128                 </fields>
5129                 <links>
5130                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5131                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5132                 </links>
5133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5134                         <actions>
5135                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5136                         </actions>
5137                 </permacrud>
5138         </class>
5139         <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">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5141                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5142                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5143                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5144                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5145                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5146                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5147                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5148                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5149                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5150                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5151                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5152                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5153                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5154                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5155                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5156                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5157                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5158                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5159                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5160                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5161                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5162                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5163                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5164                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5165                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5166                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5167                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5168                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5169                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5170                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5172                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5173                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5174                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5175                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5176                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5177                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5178                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5179                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5180                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5181                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5182                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5183                 </fields>
5184                 <links>
5185                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5186                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5187                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5188                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5189                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5190                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5191                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5192                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5193                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5194                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5195                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5196                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5197                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5198                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5199                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5200                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5201                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5202                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5203                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5204                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5205                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5206                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5207                 </links>
5208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5209                         <actions>
5210                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5211                         </actions>
5212                 </permacrud>
5213         </class>
5214
5215         <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">
5216                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5217                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5218                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5219                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5220                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5221                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5222                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5223                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5224                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5225                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5226                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5227                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5228                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5229                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5230                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5231                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5232                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5233                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5234                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5235                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5236                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5237                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5238                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5239                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5240                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5241                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5242                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5243                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5244                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5245                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5246                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5247                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5248                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5249                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5250                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5251                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5252                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5253                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5254                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5255                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5256                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5257                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5258                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5259                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5260                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5261                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5262                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5263                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5264                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5267                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5268                 </fields>
5269                 <links>
5270                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5271                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5272                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5273                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5274                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5275                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5276                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5277                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5278                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5279                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5280                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5281                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5282                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5283                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5284                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5285                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5286                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5287                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5288                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5289                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5290                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5291                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5292                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5293                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5294                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5295                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5296                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5297                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5298                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5299                 </links>
5300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5301                         <actions>
5302                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5303                         </actions>
5304                 </permacrud>
5305         </class>
5306         <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">
5307                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5308                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5309                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5310                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5311                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5312                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5313                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5314                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5315                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5316                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5317                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5318                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5319                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5320                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5321                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5322                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5323                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5324                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5325                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5326                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5327                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5328                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5329                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5330                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5331                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5332                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5333                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5334                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5335                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5336                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5337                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5338                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5339                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5340                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5341                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5342                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5343                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5344                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5345                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5346                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5347                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5348                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5349                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5350                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5351                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5352                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5353                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5354                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5355                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5356                 </fields>
5357                 <links>
5358                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5359                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5360                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5361                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5362                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5363                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5364                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5365                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5366                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5367                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5368                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5369                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5370                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5371                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5372                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5373                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5374                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5375                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5376                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5377                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5378                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5379                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
5380                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5381                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5382                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5383                 </links>
5384         </class>
5385         <class id="auch" 
5386                 controller="open-ils.cstore" 
5387                 oils_obj:fieldmapper="action::user_circ_history" 
5388                 oils_persist:tablename="action.usr_circ_history" 
5389                 reporter:label="User Checkout History">
5390                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
5391                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5392                         <!-- prevent reporting on the user that owns the checkout history -->
5393                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
5394                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5395                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
5396                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
5397                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
5398                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
5399                 </fields>
5400                 <links>
5401                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5402                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5403                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
5404                 </links>
5405         </class>
5406         <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">
5407                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
5408                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5409                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5410                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5411                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5412                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5413                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5414                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5415                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5416                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5417                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5418                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5419                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5420                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5421                 </fields>
5422                 <links>
5423                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5424                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5425                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5426                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5427                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5428                 </links>
5429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5430                         <actions>
5431                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5432                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5433                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5434                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5435                         </actions>
5436                 </permacrud>
5437         </class>
5438
5439         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5440                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5441                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5442                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5443                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5444                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5445                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5446                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5447                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5448                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5449                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5450                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5451                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5452                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5453                 </fields>
5454                 <links>
5455                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5456                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5457                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5458                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5459                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5460                 </links>
5461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5462                         <actions>
5463                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5464                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5465                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5466                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5467                         </actions>
5468                 </permacrud>
5469         </class>
5470         
5471         <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">
5472                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5473                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5474                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5475                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5476                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5477                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5478                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5479                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5480                 </fields>
5481                 <links>
5482                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5483                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5484                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5485                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5486                 </links>
5487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5488                         <actions>
5489                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5490                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5491                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5492                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5493                         </actions>
5494                 </permacrud>
5495         </class>
5496         
5497         <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">
5498                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5499                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5500                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5501                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5502                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5503                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5504                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5505                 </fields>
5506                 <links>
5507                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5508                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5509                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5510                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5511                 </links>
5512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5513                         <actions>
5514                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5515                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5516                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5517                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5518                         </actions>
5519                 </permacrud>
5520         </class>
5521         
5522         <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">
5523                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5524                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5525                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5526                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5527                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5528                 </fields>
5529                 <links>
5530                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5531                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5532                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5533                 </links>
5534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5535                         <actions>
5536                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5537                     <context link="resource" field="owner" />
5538                 </create>
5539                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5540                     <context link="resource" field="owner" />
5541                 </retrieve>
5542                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5543                     <context link="resource" field="owner" />
5544                 </update>
5545                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5546                     <context link="resource" field="owner" />
5547                 </delete>
5548                         </actions>
5549                 </permacrud>
5550         </class>
5551         
5552         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5553                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5554                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5555                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5556                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5557                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5558                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5559                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5560                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5561                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5562                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5563                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5564                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5565                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5566                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5567                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5568                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5569                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5570                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5571                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5572                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5573                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5574                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5575                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5576                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5577                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5578                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5579                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5580                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5581                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5582                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5583                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5584                 </fields>
5585                 <links>
5586                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5587                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5588                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5589                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5590                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5591                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5592                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5593                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5594                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5595                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5596                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5597                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5598                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5599                 </links>
5600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5601                         <actions>
5602                                 <create permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5603                                 <retrieve permission="VIEW_BOOKING_RESERVATION" context_field="pickup_lib"/>
5604                                 <update permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5605                                 <delete permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5606                         </actions>
5607                 </permacrud>
5608         </class>
5609         
5610         <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">
5611                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5612                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5613                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5614                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5615                 </fields>
5616                 <links>
5617                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5618                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5619                 </links>
5620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5621                         <actions>
5622                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5623                                         <context link="reservation" field="pickup_lib"/>
5624                                 </create>
5625                                 <retrieve permission="VIEW_BOOKING_RESERVATION_ATTR_MAP">
5626                                         <context link="reservation" field="pickup_lib"/>
5627                                 </retrieve>
5628                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5629                                         <context link="reservation" field="pickup_lib"/>
5630                                 </update>
5631                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5632                                         <context link="reservation" field="pickup_lib"/>
5633                                 </delete>
5634                         </actions>
5635                 </permacrud>
5636         </class>
5637
5638         <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">
5639                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5640                         <field name="bucket" reporter:datatype="link"/>
5641                         <field name="id" reporter:datatype="id" />
5642                         <field name="target_call_number" reporter:datatype="link" />
5643                         <field name="create_time" reporter:datatype="timestamp" />
5644                         <field name="pos" reporter:datatype="int" />
5645                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5646                 </fields>
5647                 <links>
5648                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5649                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5650             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5651                 </links>
5652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5653                         <actions>
5654                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5655                     <context link="bucket" owning_lib="owning_lib"/>
5656                 </retrieve>
5657             </actions>
5658         </permacrud>
5659         </class>
5660         <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">
5661                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5662                         <field name="id" reporter:datatype="id" />
5663                         <field name="item" reporter:datatype="link"/>
5664                         <field name="note" reporter:datatype="text" />
5665                 </fields>
5666                 <links>
5667                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5668                 </links>
5669         </class>
5670         <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">
5671                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5672                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5673                         <field name="btype" reporter:datatype="text"/>
5674                         <field name="id" reporter:datatype="id" />
5675                         <field name="name" reporter:datatype="text"/>
5676                         <field name="description" reporter:datatype="text"/>
5677                         <field name="owner" reporter:datatype="link"/>
5678                         <field name="pub" reporter:datatype="bool"/>
5679                         <field name="create_time" reporter:datatype="timestamp" />
5680                         <field name="owning_lib" reporter:datatype="org_unit" />
5681                 </fields>
5682                 <links>
5683                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5684                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5685                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5686                 </links>
5687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5688                         <actions>
5689                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5690                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5691                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5692                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5693                         </actions>
5694                 </permacrud>
5695         </class>
5696         <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">
5697                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5698                         <field name="id" reporter:datatype="id" />
5699                         <field name="bucket" reporter:datatype="link"/>
5700                         <field name="note" reporter:datatype="text" />
5701                 </fields>
5702                 <links>
5703                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5704                 </links>
5705         </class>
5706         <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">
5707                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5708                         <field name="hold" reporter:datatype="link"/>
5709                         <field name="id" reporter:datatype="id" />
5710                         <field name="target_copy" reporter:datatype="link"/>
5711                         <field name="proximity" reporter:datatype="number"/>
5712                 </fields>
5713                 <links>
5714                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5715                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5716                 </links>
5717         </class>
5718         <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">
5719                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5720                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5721                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5722                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5723                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5724                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5725                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5726                 </fields>
5727                 <links>
5728                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5729                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5730                 </links>
5731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5732             <actions>
5733                 <create permission="CREATE_HOLD_NOTIFICATION">
5734                                         <context link="hold" jump="usr" field="home_ou" />
5735                                 </create>
5736                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5737                                         <context link="hold" jump="usr" field="home_ou" />
5738                                 </retrieve>
5739                 <update permission="CREATE_HOLD_NOTIFICATION">
5740                                         <context link="hold" jump="usr" field="home_ou" />
5741                                 </update>
5742                 <delete permission="CREATE_HOLD_NOTIFICATION">
5743                                         <context link="hold" jump="usr" field="home_ou" />
5744                                 </delete>
5745             </actions>
5746         </permacrud>
5747         </class>
5748         <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">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5750                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5751                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5752                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5753                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5754                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5755                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5756                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5757                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5758                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5759                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5760                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5761                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5762                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5763                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5764                 </fields>
5765                 <links>
5766                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5767                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5768                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5769                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5770                 </links>
5771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5772             <actions>
5773                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5774                 <retrieve/>
5775                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5776                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5777             </actions>
5778         </permacrud>
5779         </class>
5780         <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">
5781                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5782                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5783                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5784                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5785                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" />
5786             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5787             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5788             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5789                 </fields>
5790                 <links>
5791                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5792                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5793                 </links>
5794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5795             <actions>
5796                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5797                 <retrieve/>
5798                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5799                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5800             </actions>
5801         </permacrud>
5802         </class>
5803         <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">
5804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5805                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5806             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5807             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5808                 </fields>
5809                 <links>
5810                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5811                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5812                 </links>
5813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5814             <actions>
5815                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5816                                         <context link="lgroup" field="owner" />
5817                 </create>
5818                 <retrieve/>
5819                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5820                                         <context link="lgroup" field="owner" />
5821                 </update>
5822                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5823                                         <context link="lgroup" field="owner" />
5824                 </delete>
5825             </actions>
5826         </permacrud>
5827         </class>
5828
5829     <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">
5830         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5831             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5832             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5833             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5834             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5835         </fields>
5836         <links>
5837             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5838             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5839         </links>
5840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5841             <actions>
5842                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5843                 <retrieve/>
5844                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5845                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5846             </actions>
5847         </permacrud>
5848     </class>
5849
5850         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5851                 <fields>
5852                         <field name="sre_id" oils_persist:virtual="true" />
5853                         <field name="location" oils_persist:virtual="true" />
5854                         <field name="owning_lib" oils_persist:virtual="true" />
5855                         <field name="basic_holdings" oils_persist:virtual="true" />
5856                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5857                         <field name="supplement_holdings" oils_persist:virtual="true" />
5858                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5859                         <field name="index_holdings" oils_persist:virtual="true" />
5860                         <field name="index_holdings_add" oils_persist:virtual="true" />
5861                         <field name="online" oils_persist:virtual="true" />
5862                         <field name="missing" oils_persist:virtual="true" />
5863                         <field name="incomplete" oils_persist:virtual="true" />
5864                 </fields>
5865         </class>
5866
5867         <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">
5868                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5869                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5870                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5871                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5872                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5873                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5874                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5875                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5876                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5877                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5878                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5879                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5880                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5881                 </fields>
5882                 <links>
5883                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5884                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5885                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5886                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5887                 </links>
5888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5889                         <actions>
5890                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5891                                 <retrieve/>
5892                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5893                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5894                         </actions>
5895                 </permacrud>
5896         </class>
5897
5898         <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">
5899                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5901                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5902                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5903                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5904                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5905                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5906                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5907                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5908                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5909                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5910                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5911                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5912                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5913                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5914                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5915                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5916                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5917                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5918                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5919                 </fields>
5920                 <links>
5921                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5922                 </links>
5923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5924                         <actions>
5925                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5926                                         <context link="subscription" field="owning_lib" />
5927                                 </create>
5928                                 <retrieve />
5929                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5930                                         <context link="subscription" field="owning_lib" />
5931                                 </update>
5932                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5933                                         <context link="subscription" field="owning_lib" />
5934                                 </delete>
5935                         </actions>
5936                 </permacrud>
5937         </class>
5938
5939         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5940                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5941                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5942                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5943                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5944                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5945                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5946                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5947                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5948                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5949                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5950                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5951                 </fields>
5952                 <links>
5953                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5954                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5955                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5956                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5957                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5958                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5959                 </links>
5960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5961                         <actions>
5962                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5963                                 <retrieve />
5964                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5965                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5966                         </actions>
5967                 </permacrud>
5968         </class>
5969
5970         <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">
5971                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5972                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5973                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5974                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5975                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5976                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5977                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5978                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5979                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5980                 </fields>
5981                 <links>
5982                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5983                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5984                 </links>
5985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5986                         <actions>
5987                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5988                     <context link="subscription" field="owning_lib"/>
5989                 </create>
5990                                 <retrieve />
5991                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5992                     <context link="subscription" field="owning_lib"/>
5993                 </update>
5994                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5995                     <context link="subscription" field="owning_lib"/>
5996                 </delete>
5997                         </actions>
5998                 </permacrud>
5999         </class>
6000
6001         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
6002                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
6003                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6004                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
6005                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
6006                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6007                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
6008                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6009                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
6010                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
6011                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
6012                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
6013                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
6014                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
6015                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
6016                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
6017                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6018                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6019                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6020                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6021                 </fields>
6022                 <links>
6023                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
6024                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6025                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
6026                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
6027                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
6028                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
6029                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
6030                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
6031                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
6032                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
6033                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
6034                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
6035                 </links>
6036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6037                         <actions>
6038                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6039                                 <retrieve />
6040                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6041                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6042                         </actions>
6043                 </permacrud>
6044         </class>
6045
6046         <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">
6047                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
6048                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6049                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6050                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6051                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6052                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6053                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6054                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6055                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6056                 </fields>
6057                 <links>
6058                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6059                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6060                 </links>
6061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6062                         <actions>
6063                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6064                                         <context link="distribution" field="holding_lib" />
6065                                 </create>
6066                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
6067                                         <context link="distribution" field="holding_lib" />
6068                                 </retrieve>
6069                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6070                                         <context link="distribution" field="holding_lib" />
6071                                 </update>
6072                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6073                                         <context link="distribution" field="holding_lib" />
6074                                 </delete>
6075                         </actions>
6076                 </permacrud>
6077         </class>
6078
6079         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
6080                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
6081                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6082                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6083                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
6084                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6085                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
6086                 </fields>
6087                 <links>
6088                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6089                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
6090                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
6091                 </links>
6092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6093                         <actions>
6094                                 <create permission="ADMIN_SERIAL_STREAM">
6095                                         <context link="distribution" field="holding_lib" />
6096                                 </create>
6097                                 <retrieve />
6098                                 <update permission="ADMIN_SERIAL_STREAM">
6099                                         <context link="distribution" field="holding_lib" />
6100                                 </update>
6101                                 <delete permission="ADMIN_SERIAL_STREAM">
6102                                         <context link="distribution" field="holding_lib" />
6103                                 </delete>
6104                         </actions>
6105                 </permacrud>
6106         </class>
6107
6108         <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">
6109                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
6110                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6111                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6112                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
6113                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
6114                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
6115                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6116                 </fields>
6117                 <links>
6118                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6119                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
6120                 </links>
6121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6122                         <actions>
6123                                 <create permission="ADMIN_SERIAL_STREAM">
6124                                         <context link="stream" jump="distribution" field="holding_lib" />
6125                                 </create>
6126                                 <retrieve permission="RECEIVE_SERIAL">
6127                                         <context link="stream" jump="distribution" field="holding_lib" />
6128                                 </retrieve>
6129                                 <update permission="ADMIN_SERIAL_STREAM">
6130                                         <context link="stream" jump="distribution" field="holding_lib" />
6131                                 </update>
6132                                 <delete permission="ADMIN_SERIAL_STREAM">
6133                                         <context link="stream" jump="distribution" field="holding_lib" />
6134                                 </delete>
6135                         </actions>
6136                 </permacrud>
6137         </class>
6138
6139         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
6140                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
6141                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6142                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6143                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6144                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6145                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6146                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6147                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
6148                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6149                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
6150                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
6151                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
6152                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
6153                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6154                 </fields>
6155                 <links>
6156                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6157                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6158                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6159                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
6160                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
6161                 </links>
6162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6163                         <actions>
6164                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
6165                                         <context link="subscription" field="owning_lib" />
6166                                 </create>
6167                                 <retrieve/>
6168                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
6169                                         <context link="subscription" field="owning_lib" />
6170                                 </update>
6171                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
6172                                         <context link="subscription" field="owning_lib" />
6173                                 </delete>
6174                         </actions>
6175                 </permacrud>
6176         </class>
6177
6178         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
6179                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6180                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6181                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6182                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6183                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6184                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6185                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6186                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6187                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6188                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6189                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6190                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6191                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6192                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6193                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6194                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6195                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6196                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6197                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6198                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6199                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6200                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6201                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6202                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6203                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6204                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6205                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6206                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6207                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6208                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6209                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6210                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6211                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6212                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6213                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
6214                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
6215                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
6216                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6217                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6218                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6219                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6220                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6221                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6222                 </fields>
6223                 <links>
6224                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6225                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6226                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6227                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6228                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6229                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6230                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6231                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6232                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6233                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6234                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6235                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6236                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6237                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6238                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6239                 </links>
6240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6241                         <actions>
6242                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6243                                 <retrieve/>
6244                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6245                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6246                         </actions>
6247                 </permacrud>
6248         </class>
6249
6250         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
6251                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
6252                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6253                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6254                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6255                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6256                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6257                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
6258                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6259                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
6260                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
6261                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
6262                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
6263                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6264                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6265                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
6266                 </fields>
6267                 <links>
6268                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6269                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6270                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6271                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6272                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
6273                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
6274                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
6275                 </links>
6276                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6277                         <actions>
6278                                 <create permission="ADMIN_SERIAL_ITEM">
6279                                         <context link="stream" jump="distribution" field="holding_lib" />
6280                                 </create>
6281                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6282                                         <context link="stream" jump="distribution" field="holding_lib" />
6283                                 </retrieve>
6284                                 <update permission="ADMIN_SERIAL_ITEM">
6285                                         <context link="stream" jump="distribution" field="holding_lib" />
6286                                 </update>
6287                                 <delete permission="ADMIN_SERIAL_ITEM">
6288                                         <context link="stream" jump="distribution" field="holding_lib" />
6289                                 </delete>
6290                         </actions>
6291                 </permacrud>
6292         </class>
6293
6294         <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">
6295                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
6296                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6297                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
6298                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6299                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6300                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6301                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6302                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6303                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6304                 </fields>
6305                 <links>
6306                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6307                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6308                 </links>
6309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6310                         <actions>
6311                                 <create permission="ADMIN_SERIAL_ITEM">
6312                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6313                                 </create>
6314                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6315                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6316                                 </retrieve>
6317                                 <update permission="ADMIN_SERIAL_ITEM">
6318                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6319                                 </update>
6320                                 <delete permission="ADMIN_SERIAL_ITEM">
6321                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6322                                 </delete>
6323                         </actions>
6324                 </permacrud>
6325         </class>
6326         <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">
6327                 <fields>
6328                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
6329                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
6330                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
6331                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
6332                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
6333                 </fields>
6334                 <links>
6335                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6336                 </links>
6337         </class>
6338         <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">
6339                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
6340                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6341                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
6342                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
6343                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
6344                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
6345                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
6346                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
6347                 </fields>
6348                 <links>
6349                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6350                 </links>
6351         </class>
6352         <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">
6353                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
6354                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6355                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6356                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6357                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6358                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6359                 </fields>
6360                 <links>
6361                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6362                 </links>
6363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6364                         <actions>
6365                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6366                                         <context link="distribution" field="holding_lib" />
6367                                 </create>
6368                                 <retrieve/>
6369                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6370                                         <context link="distribution" field="holding_lib" />
6371                                 </update>
6372                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6373                                         <context link="distribution" field="holding_lib" />
6374                                 </delete>
6375                         </actions>
6376                 </permacrud>
6377         </class>
6378
6379         <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">
6380                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
6381                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6382                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6383                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6384                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6385                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6386                 </fields>
6387                 <links>
6388                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6389                 </links>
6390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6391                         <actions>
6392                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6393                                         <context link="distribution" field="holding_lib" />
6394                                 </create>
6395                                 <retrieve/>
6396                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6397                                         <context link="distribution" field="holding_lib" />
6398                                 </update>
6399                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6400                                         <context link="distribution" field="holding_lib" />
6401                                 </delete>
6402                         </actions>
6403                 </permacrud>
6404         </class>
6405
6406         <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">
6407                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
6408                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6409                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6410                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6411                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6412                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6413                 </fields>
6414                 <links>
6415                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6416                 </links>
6417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6418                         <actions>
6419                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6420                                         <context link="distribution" field="holding_lib" />
6421                                 </create>
6422                                 <retrieve/>
6423                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6424                                         <context link="distribution" field="holding_lib" />
6425                                 </update>
6426                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6427                                         <context link="distribution" field="holding_lib" />
6428                                 </delete>
6429                         </actions>
6430                 </permacrud>
6431         </class>
6432
6433         <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">
6434                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6435                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6436                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6437                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6438                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6439                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6440                 </fields>
6441                 <links>
6442                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6443                 </links>
6444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6445                         <actions>
6446                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6447                                 <retrieve/>
6448                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6449                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6450                         </actions>
6451                 </permacrud>
6452         </class>
6453
6454         <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">
6455                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6456                         <field name="id" reporter:datatype="id" />
6457                         <field name="owning_copy" reporter:datatype="link"/>
6458                         <field name="stat_cat" reporter:datatype="link"/>
6459                         <field name="stat_cat_entry" reporter:datatype="link"/>
6460                 </fields>
6461                 <links>
6462                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6463                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6464                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6465                 </links>
6466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6467                         <actions>
6468                                 <retrieve/>
6469                         </actions>
6470                 </permacrud>
6471         </class>
6472         <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">
6473                 <fields oils_persist:primary="code">
6474                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6475                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6476                 </fields>
6477                 <links/>
6478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6479             <actions>
6480                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6481                 <retrieve/>
6482                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6483                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6484             </actions>
6485         </permacrud>
6486         </class>
6487         <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">
6488                 <fields oils_persist:primary="code">
6489                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6490                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6491                 </fields>
6492                 <links/>
6493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6494             <actions>
6495                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6496                 <retrieve/>
6497                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6498                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6499             </actions>
6500         </permacrud>
6501         </class>
6502         <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">
6503                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6504                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6505                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6506                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6507                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6508                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6509                 </fields>
6510                 <links>
6511             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6512         </links>
6513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6514             <actions>
6515                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6516                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6517                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6518                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6519             </actions>
6520         </permacrud>
6521         </class>
6522         <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">
6523                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6524                         <field reporter:label="Library Group ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6525                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6526                         <field reporter:label="Global?" name="global" reporter:datatype="bool"/>
6527                         <field reporter:label="Maps" name="maps" oils_persist:virtual="true" reporter:datatype="link"/>
6528                 </fields>
6529                 <links>
6530                         <link field="maps" reltype="has_many" key="lasso" map="" class="lmap"/>
6531         </links>
6532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6533             <actions>
6534                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6535                 <retrieve/>
6536                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6537                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6538             </actions>
6539         </permacrud>
6540         </class>
6541         <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">
6542                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6543                         <field reporter:label="Library Group Map ID" name="id" reporter:datatype="id" />
6544                         <field reporter:label="Library Group" name="lasso" reporter:datatype="link"/>
6545                         <field reporter:label="Organizational Unit" name="org_unit" reporter:datatype="org_unit"/>
6546                 </fields>
6547                 <links>
6548                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6549                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6550                 </links>
6551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6552             <actions>
6553                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6554                 <retrieve/>
6555                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6556                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6557             </actions>
6558         </permacrud>
6559         </class>
6560         <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">
6561                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6562                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6563                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6564                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6565                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6566                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6567                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6568                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6569                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6570                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6571                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6572                 </fields>
6573                 <links>
6574                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6575                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6576                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6577                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6578                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6579                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6580                 </links>
6581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6582             <actions>
6583                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6584                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6585                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6586                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6587             </actions>
6588         </permacrud>
6589         </class>
6590         <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">
6591                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6592                         <field name="id" reporter:datatype="id" />
6593                         <field name="from_org" reporter:datatype="org_unit"/>
6594                         <field name="to_org" reporter:datatype="org_unit"/>
6595                         <field name="prox" reporter:datatype="int" />
6596                 </fields>
6597                 <links>
6598                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6599                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6600                 </links>
6601         </class>
6602         <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">
6603                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6604                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6605                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6606                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6607                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6608                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6609                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6610                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6611                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6612                 </fields>
6613                 <links/>
6614         </class>
6615         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6616                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6617                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6618                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6619                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6620                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6621                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6622                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6623                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6624                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6625                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6626                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6627                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6628                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6629                 </fields>
6630                 <links>
6631                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6632                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6633                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6634                 </links>
6635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6636             <actions>
6637                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6638                 <retrieve/>
6639                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6640                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6641             </actions>
6642         </permacrud>
6643         </class>
6644         <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">
6645                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6646                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6647                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6648                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6649                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6650                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6651                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6652                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6653                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6654                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6655                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6656                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6657                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6658                         <field name="latitude" reporter:label="Latitude" reporter:datatype="float"/>
6659                         <field name="longitude" reporter:label="Longitude" reporter:datatype="float"/>
6660                 </fields>
6661                 <links>
6662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6663                 </links>
6664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6665             <actions>
6666                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6667                 <retrieve/>
6668                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6669                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6670             </actions>
6671         </permacrud>
6672         </class>
6673         <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">
6674                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6675                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6676                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6677                         <field name="query_text" reporter:datatype="text"/>
6678                 </fields>
6679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6680             <actions>
6681                 <retrieve/>
6682             </actions>
6683         </permacrud>
6684         </class>
6685
6686         <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">
6687                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6688                         <field name="id" reporter:datatype="id" reporter:selector="label" reporter:label="ID" oils_obj:required="true"/>
6689                         <field name="owner" reporter:datatype="org_unit" reporter:label="Owning Org Unit" oils_obj:required="true"/>
6690                         <field name="code" reporter:datatype="text" reporter:label="Code" oils_obj:required="true"/>
6691                         <field name="label" reporter:datatype="text" oils_persist:i18n="true" reporter:label="Label" oils_obj:required="true"/>
6692                         <field name="create_date" reporter:datatype="timestamp" reporter:label="Create Date"/>
6693                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link" reporter:label="Group Entries"/>
6694                 </fields>
6695                 <links>
6696                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6697                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6698                 </links>
6699         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6700             <actions>
6701                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6702                 <retrieve/>
6703                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6704                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6705             </actions>
6706         </permacrud>
6707         </class>
6708         <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">
6709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6710                         <field name="id" reporter:datatype="id" reporter:label="ID" oils_obj:required="true"/>
6711                         <field name="grp" reporter:datatype="link" reporter:label="Search Filter Group" oils_obj:required="true"/>
6712                         <field name="pos" reporter:datatype="int" reporter:label="Position" oils_obj:required="true"/>
6713                         <field name="query" reporter:datatype="link" reporter:label="Query" oils_obj:required="true"/>
6714                 </fields>
6715                 <links>
6716                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6717                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6718                 </links>
6719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6720             <actions>
6721                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6722                     <context link="grp" field="owner"/>
6723                 </create>
6724                 <retrieve/>
6725                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6726                     <context link="grp" field="owner"/>
6727                 </update>
6728                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6729                     <context link="grp" field="owner"/>
6730                 </delete>
6731             </actions>
6732         </permacrud>
6733         </class>
6734
6735         <!-- A note: Please update alhr and ahopl when updating ahr -->
6736         <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">
6737                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6738                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6739                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6740                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6741                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6742                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6743                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6744                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6745                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6746                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6747                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6748                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6749                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6750                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6751                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6752                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6753                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6754                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6755                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6756                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6757                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6758                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6759                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6760                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6761                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6762                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6764                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6765                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6769                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6770                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6771                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6772                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6773                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6774                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6775                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6776                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6777                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6778                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6779                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6780                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6781                 </fields>
6782                 <links>
6783                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6784                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6785                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6786                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6787                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6788                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6789                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6790                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6791                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6792                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6793                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6794                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6795                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6796                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6797                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6798                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6799                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6800                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6801                 </links>
6802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6803                         <actions>
6804                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6805                         </actions>
6806                 </permacrud>
6807         </class>
6808         <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">
6809                 <oils_persist:source_definition><![CDATA[
6810                 SELECT
6811                         ahr.*,
6812                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6813                                 copy_location_order_position,
6814                         CASE WHEN au.alias IS NOT NULL THEN
6815                                 au.alias
6816                         ELSE
6817                                 au.first_given_name
6818                         END AS usr_alias_or_first_given_name,
6819                         au.first_given_name AS usr_first_given_name,
6820                         au.second_given_name AS usr_second_given_name,
6821                         au.family_name AS usr_family_name,
6822                         au.prefix AS usr_prefix,
6823                         au.suffix AS usr_suffix,
6824                         au.alias AS usr_alias,
6825                         CASE WHEN au.alias IS NOT NULL THEN
6826                                 au.alias
6827                         ELSE
6828                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6829                                         COALESCE(au.family_name, ''),
6830                                         COALESCE(au.suffix, ''),
6831                                         ', ',
6832                                         COALESCE(au.prefix, ''),
6833                                         COALESCE(au.first_given_name, ''),
6834                                         COALESCE(au.second_given_name, '')
6835                                 ], ' '), E'\\s+,', ',')
6836                         END AS usr_alias_or_display_name,
6837                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6838                                 COALESCE(au.family_name, ''),
6839                                 COALESCE(au.suffix, ''),
6840                                 ', ',
6841                                 COALESCE(au.prefix, ''),
6842                                 COALESCE(au.first_given_name, ''),
6843                                 COALESCE(au.second_given_name, '')
6844                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6845                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6846                                 AS call_number_label,
6847                         siss.label AS issuance_label,
6848                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6849                         ahcm_1.copy_count AS potential_copies
6850                 FROM action.hold_request ahr
6851                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6852                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6853                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6854                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6855                 JOIN actor.usr au ON (au.id = ahr.usr)
6856                 JOIN (
6857                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6858                         FROM asset.copy_location
6859                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6860                 LEFT JOIN actor.usr_standing_penalty ausp 
6861                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6862                 LEFT JOIN config.standing_penalty csp
6863                         ON (
6864                                 csp.id = ausp.standing_penalty AND 
6865                                 csp.block_list LIKE '%CAPTURE%' AND (
6866                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6867                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6868                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6869                                         )
6870                                 )
6871                         )
6872                 JOIN (
6873                         SELECT COUNT(target_copy) AS copy_count, hold
6874                         FROM action.hold_copy_map
6875                         GROUP BY 2
6876                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6877                 LEFT JOIN serial.issuance siss
6878                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6879                 LEFT JOIN asset.copy_location_order acplo
6880                         ON (acp.location = acplo.location AND
6881                                 acp.circ_lib = acplo.org)
6882                 WHERE
6883                         ahr.capture_time IS NULL AND
6884                         ahr.cancel_time IS NULL AND
6885                         csp.id IS NULL AND
6886                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6887                         acp.status IN (0,7)
6888                 ]]></oils_persist:source_definition>
6889                 <fields oils_persist:primary="id">
6890                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6891                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6892                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6893                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6894                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6895                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6896                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6897                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6898                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6899                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6900                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6901                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6902                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6903                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6904                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6905                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6906                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6907                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6908                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6909                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6910                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6911                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6912                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6913                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6914                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6915                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6916                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6917                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6918                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6919                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6920                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6921                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6922                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6923                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6924                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6925                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6926                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6927                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6928                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6929                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6930                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6931                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6932                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6933                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6934                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6935                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6936                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6937                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6938                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6939                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6940                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6941                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6942                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6943                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6944                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6945                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6946                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6947                 </fields>
6948                 <links>
6949                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6950                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6951                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6952                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6953                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6954                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6955                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6956                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6957                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6958                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6959                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6960                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6961                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6962                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6963                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6964                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6965                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6966                 </links>
6967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6968                         <actions>
6969                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6970                         </actions>
6971                 </permacrud>
6972         </class>
6973         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6974                 <oils_persist:source_definition><![CDATA[
6975                         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)
6976                 ]]></oils_persist:source_definition>
6977                 <fields oils_persist:primary="id">
6978                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6979                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6980                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6981                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6982                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6983                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6984                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6985                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6986                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6987                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6988                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6989                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6990                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6991                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6992                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6993                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6994                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6995                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6996                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6997                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6998                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6999                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
7000                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7001                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
7002                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
7003                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
7004                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7005                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
7006                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7007                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7008                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7009                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7010                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7011                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7012                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7013                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7014                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
7015                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7016                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
7017                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
7018                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
7019                 </fields>
7020                 <links>
7021                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7022                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7023                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7024                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7025                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
7026                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7027                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7028                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7029                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
7030                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
7031                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
7032                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7033                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7034                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
7035                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7036                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
7037                 </links>
7038         </class>
7039
7040         <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">
7041                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
7042                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7043                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7044                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7045                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
7046                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
7047                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
7048                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
7049                 </fields>
7050                 <links>
7051                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7052                 </links>
7053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7054                         <actions>
7055                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
7056                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
7057                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
7058                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
7059                         </actions>
7060                 </permacrud>
7061         </class>
7062         <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">
7063                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7064                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7065                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7066                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7067                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7068                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7069                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7070                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7071                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7072                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7073                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7074                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7075                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7076                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7077                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7078                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7079                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7080                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7081                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7082                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7083                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7084                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7085                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7086                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7087                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7088                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7089                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7090                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7091                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7092                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7093                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7094                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7095                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7096                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7097                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7098                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7099                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7100                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
7101                 </fields>
7102                 <links>
7103                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7104                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7105                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7106                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7107                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7108                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7109                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7110                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7111                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7112                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7113                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7114                 </links>
7115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7116                         <actions>
7117                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7118                         </actions>
7119                 </permacrud>
7120         </class>
7121         <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">
7122                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7123                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7124                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7125                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7126                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7127                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7128                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7129                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7130                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7131                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7132                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7133                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7134                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7135                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7136                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7137                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7138                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7139                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7140                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7141                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7142                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7143                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7144                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7145                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7146                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7147                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7148                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7149                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7150                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7151                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7152                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7153                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7154                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7155                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7156                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7157                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7158                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7159                 </fields>
7160                 <links>
7161                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7162                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7163                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7164                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7165                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7166                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7167                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7168                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7169                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7170                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7171                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7172                 </links>
7173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7174                         <actions>
7175                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7176                         </actions>
7177                 </permacrud>
7178         </class>
7179
7180         <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">
7181                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
7182                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
7183                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
7184                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
7185                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
7186                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
7187                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
7188                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
7189                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
7190                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
7191                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
7192                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7193                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
7194                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7195                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
7196                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
7197                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
7198                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7199                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
7200                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
7201                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
7202                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7204                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
7213                 </fields>
7214                 <links>
7215                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
7216                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
7217                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
7218                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
7219                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
7220                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
7221                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7222                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
7223                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
7224                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
7225                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
7226                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
7227                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
7228                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
7229                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
7230                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
7231                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
7232                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
7233                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
7234                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
7235                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
7236                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
7237                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
7238                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
7239                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
7240                 </links>
7241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7242             <actions>
7243                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
7244                 <retrieve />
7245                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
7246                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
7247             </actions>
7248         </permacrud>
7249         </class>
7250         <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">
7251                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
7252                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7253                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
7254                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
7255                 </fields>
7256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7257                         <actions>
7258                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7259                                 <retrieve/>
7260                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7261                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7262                         </actions>
7263                 </permacrud>
7264         </class>
7265         <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">
7266                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
7267                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7268                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
7269                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
7270                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
7271                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
7272                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
7273                 </fields>
7274                 <links>
7275                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
7276                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7277                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
7278                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
7279                 </links>
7280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7281                         <actions>
7282                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7283                                 <retrieve/>
7284                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7285                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7286                         </actions>
7287                 </permacrud>
7288         </class>
7289         <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">
7290                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
7291                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7292                         <field name="btype" reporter:datatype="text"/>
7293                         <field name="id" reporter:datatype="id" />
7294                         <field name="name"  reporter:datatype="text"/>
7295                         <field name="description" reporter:datatype="text"/>
7296                         <field name="owner" reporter:datatype="link"/>
7297                         <field name="pub" reporter:datatype="bool"/>
7298                         <field name="create_time" reporter:datatype="timestamp" />
7299                         <field name="owning_lib" reporter:datatype="org_unit" />
7300                 </fields>
7301                 <links>
7302                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7303                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7304                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
7305                 </links>
7306                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7307                         <actions>
7308                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7309                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7310                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7311                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7312                         </actions>
7313                 </permacrud>
7314         </class>
7315         <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">
7316                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
7317                         <field name="id" reporter:datatype="id" />
7318                         <field name="bucket" reporter:datatype="link"/>
7319                         <field name="note" reporter:datatype="text" />
7320                 </fields>
7321                 <links>
7322                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
7323                 </links>
7324         </class>
7325         <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">
7326                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
7327                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7328                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7329                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7330                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7331                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7332                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7333                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7334                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7335                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7336                 </fields>
7337                 <links>
7338                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7339                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
7340                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
7341                 </links>
7342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7343                         <actions>
7344                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7345                         </actions>
7346                 </permacrud>
7347         </class>
7348         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
7349                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
7350                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
7351                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7352                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
7353                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7354                 </fields>
7355                 <links>
7356                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7357                 </links>
7358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7359                         <actions>
7360                                 <retrieve permission="VIEW_USER user_request.view">
7361                                         <context link="usr" field="home_ou" />
7362                                 </retrieve>
7363                         </actions>
7364                 </permacrud>
7365         </class>
7366     <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">
7367         <fields oils_persist:primary="field">
7368             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7369             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7370             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7371         </fields>
7372         <links/>
7373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7374             <actions>
7375                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
7376                 <retrieve />
7377                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
7378                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
7379             </actions>
7380         </permacrud>
7381     </class>
7382         <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">
7383                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
7384                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7385                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7386                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7387                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7389                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7390                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
7391                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7392                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7393                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7394                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7395                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
7396                 </fields>
7397                 <links>
7398                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7399                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
7400                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
7401                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
7402                 </links>
7403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7404             <actions>
7405                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
7406                 <retrieve />
7407                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
7408                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
7409             </actions>
7410         </permacrud>
7411         </class>
7412         <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">
7413                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
7414                         <field name="field" reporter:datatype="link"/>
7415                         <field name="id" reporter:datatype="id" />
7416                         <field name="source" reporter:datatype="link"/>
7417                         <field name="value"  reporter:datatype="text"/>
7418                 </fields>
7419                 <links>
7420                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7421                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7422                 </links>
7423         </class>
7424         <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">
7425                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
7426                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7427                         <field name="btype" reporter:datatype="text"/>
7428                         <field name="id" reporter:datatype="id" />
7429                         <field name="name"  reporter:datatype="text"/>
7430                         <field name="description" reporter:datatype="text"/>
7431                         <field name="owner" reporter:datatype="link"/>
7432                         <field name="pub" reporter:datatype="bool"/>
7433                         <field name="create_time" reporter:datatype="timestamp" />
7434                         <field name="owning_lib" reporter:datatype="org_unit" />
7435                 </fields>
7436                 <links>
7437                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7438                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7439                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7440                 </links>
7441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7442                         <actions>
7443                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7444                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7445                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7446                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7447                         </actions>
7448                 </permacrud>
7449         </class>
7450         <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">
7451                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7452                         <field name="id" reporter:datatype="id" />
7453                         <field name="bucket" reporter:datatype="link"/>
7454                         <field name="note" reporter:datatype="text" />
7455                 </fields>
7456                 <links>
7457                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7458                 </links>
7459         </class>
7460         <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">
7461                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7462                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7463                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7464                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7465                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7466                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7467                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7468                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7469                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7470                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7471                 </fields>
7472                 <links>
7473                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7474                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7475                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7476                 </links>
7477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7478             <actions>
7479                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7480                     <context link="xact" jump="usr" field="home_ou"/>
7481                 </retrieve>
7482                         </actions>
7483                 </permacrud>
7484         </class>
7485         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7486                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7487                         <field name="id" reporter:datatype="id" />
7488                         <field name="ind1" />
7489                         <field name="ind2" />
7490                         <field name="record" />
7491                         <field name="subfield" />
7492                         <field name="tag" />
7493                         <field name="value" />
7494                 </fields>
7495                 <links>
7496                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7497                 </links>
7498         </class>
7499         <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">
7500                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7501                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7502                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7503                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7504                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7505                 </fields>
7506                 <links>
7507                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7508                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7509                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7510                 </links>
7511         </class>
7512         <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">
7513                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7514                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7515                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7516                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7517                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7518                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7519                 </fields>
7520                 <links>
7521                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7522                 </links>
7523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7524             <actions>
7525                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7526                 <retrieve/>
7527                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7528                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7529             </actions>
7530         </permacrud>
7531
7532         </class>
7533         <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">
7534                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7535                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7536                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7537                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7538                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7539                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7540                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7541                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7542                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7543                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7544                 </fields>
7545                 <links>
7546                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7547                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7548                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7549                 </links>
7550         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7551             <actions>
7552                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7553                 <retrieve/>
7554                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7555                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7556             </actions>
7557         </permacrud>
7558         </class>
7559         <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">
7560                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7561                         <field reporter:label="Creation Date" name="create_date" reporter:datatype="timestamp"/>
7562                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7563                         <field reporter:label="Last Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7564                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7565                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
7566                         <field reporter:label="Public" name="pub" reporter:datatype="bool"/>
7567                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
7568                         <field reporter:label="Note" name="value" reporter:datatype="text"/>
7569                         <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/> 
7570                 </fields>
7571                 <links>
7572                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7573                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7574                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7575                 </links>
7576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7577                 <actions>
7578                     <create permission="CREATE_RECORD_NOTE" global_required="true"/>
7579                     <retrieve/>
7580                     <update permission="UPDATE_RECORD_NOTE" global_required="true"/>
7581                     <delete permission="DELETE_RECORD_NOTE" global_required="true"/>
7582                 </actions>
7583              </permacrud>
7584         </class>
7585         <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">
7586                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7587                         <field name="balance_owed" reporter:datatype="money" />
7588                         <field name="total_owed" reporter:datatype="money" />
7589                         <field name="total_paid" reporter:datatype="money" />
7590                         <field name="usr" reporter:datatype="link"/>
7591                 </fields>
7592                 <links>
7593                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7594                 </links>
7595         </class>
7596     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7597                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7598                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7599                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7600                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7601                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7602                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7603                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7604                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7605                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7606                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7607                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7608                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7609                 </fields>
7610                 <links>
7611                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7612                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7613                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7614                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7615                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7616                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7617                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7618                 </links>
7619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7620             <actions>
7621                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7622             </actions>
7623         </permacrud>
7624         </class>
7625         <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">
7626                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7627                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7628                         <field name="quality" reporter:datatype="int" />
7629                         <field name="source" reporter:datatype="text"/>
7630                         <field name="transcendant" reporter:datatype="bool"/>
7631                         <field name="can_have_copies" reporter:datatype="bool"/>
7632                 </fields>
7633                 <links/>
7634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7635             <actions>
7636                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7637                 <retrieve/>
7638                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7639                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7640             </actions>
7641         </permacrud>
7642         </class>
7643         <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">
7644                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7645                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7646                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7647                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7648                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7649                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7650                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7651                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7652                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7653                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7654                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7655                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7656                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7657                 </fields>
7658                 <links>
7659                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7660                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7661                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7662                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7663                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7664                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7665                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7666                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7667                 </links>
7668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7669                         <actions>
7670                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7671                                         <context link="usr" field="home_ou" />
7672                                 </retrieve>
7673                         </actions>
7674                 </permacrud>
7675         </class>
7676         <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">
7677                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7678                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7679                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7680                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7681                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7682                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7683                 </fields>
7684                 <links>
7685                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7686                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7687                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7688                 </links>
7689         </class>
7690         <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">
7691                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7692                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7693                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7694                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7695                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7696                 </fields>
7697                 <links>
7698                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7699                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7700                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7701                 </links>
7702         </class>
7703         <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">
7704                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7705                         <field name="bucket" reporter:datatype="link"/>
7706                         <field name="id" reporter:datatype="id" />
7707                         <field name="target_user" reporter:datatype="link"/>
7708                         <field name="create_time" reporter:datatype="timestamp" />
7709                         <field name="pos" reporter:datatype="int" />
7710                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7711                 </fields>
7712                 <links>
7713                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7714                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7715             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7716                 </links>
7717                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7718                         <actions>
7719                                 <retrieve permission="ADMIN_USER_BUCKET">
7720                     <context link="bucket" owning_lib="owning_lib"/>
7721                 </retrieve>
7722             </actions>
7723         </permacrud>
7724         </class>
7725         <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">
7726                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_id_seq">
7727                         <field name="id" reporter:datatype="id" />
7728                         <field name="staff" reporter:datatype="link"/>
7729                         <field name="bucket" reporter:datatype="link"/>
7730                         <field name="target" reporter:datatype="int" />
7731                         <field name="hold_type" reporter:datatype="text" />
7732                         <field name="run_date" reporter:datatype="timestamp" />
7733                         <field name="cancelled" reporter:datatype="timestamp" />
7734                         <field name="mappings" oils_persist:virtual="true" reporter:datatype="link" />
7735                 </fields>
7736                 <links>
7737                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7738                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7739                         <link field="mappings" reltype="has_many" key="batch_hold_event" map="" class="abhem"/>
7740                 </links>
7741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7742                         <actions>
7743                 <create permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7744                 <retrieve/>
7745                 <update permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7746                 <delete permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7747             </actions>
7748         </permacrud>
7749         </class>
7750         <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">
7751                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_map_id_seq">
7752                         <field name="id" reporter:datatype="id" />
7753                         <field name="batch_hold_event" reporter:datatype="link"/>
7754                         <field name="hold" reporter:datatype="link"/>
7755                 </fields>
7756                 <links>
7757                         <link field="batch_hold_event" reltype="has_a" key="id" map="" class="abhe"/>
7758                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7759                 </links>
7760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7761                         <actions>
7762                 <retrieve/>
7763             </actions>
7764         </permacrud>
7765         </class>
7766         <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">
7767                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7768                         <field name="id" reporter:datatype="id" />
7769                         <field name="item" reporter:datatype="link"/>
7770                         <field name="note" reporter:datatype="text" />
7771                 </fields>
7772                 <links>
7773                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7774                 </links>
7775         </class>
7776         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7777                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7778                         <field name="balance_owed" reporter:datatype="money" />
7779                         <field name="total_owed" reporter:datatype="money" />
7780                         <field name="total_paid" reporter:datatype="money" />
7781                         <field name="usr" reporter:datatype="link"/>
7782                 </fields>
7783                 <links>
7784                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7785                 </links>
7786         </class>
7787         <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">
7788                 <fields oils_persist:primary="code" oils_persist:sequence="">
7789                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7790                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7791                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7792                 </fields>
7793                 <links/>
7794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7795             <actions>
7796                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7797                 <retrieve/>
7798                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7799                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7800             </actions>
7801         </permacrud>
7802         </class>
7803         <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">
7804                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7805                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7806                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7807                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7808                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7809                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7810                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7811                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7812                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7813                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7814                 </fields>
7815                 <links>
7816                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7817                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7818                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7819                 </links>
7820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7821             <actions>
7822                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7823                     <context link="xact" jump="usr" field="home_ou"/>
7824                 </retrieve>
7825                         </actions>
7826                 </permacrud>
7827         </class>
7828         <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">
7829                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7830                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7831                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7832                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7833                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7834                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7835                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7836                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7837                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7838                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7839                 </fields>
7840                 <links>
7841                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7842                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7843                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7844                 </links>
7845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7846             <actions>
7847                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7848                     <context link="xact" jump="usr" field="home_ou"/>
7849                 </retrieve>
7850                         </actions>
7851                 </permacrud>
7852         </class>
7853         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7854                 <fields oils_persist:primary="id" oils_persist:sequence="">
7855                         <field name="checkin_lib" reporter:datatype="link"/>
7856                         <field name="checkin_staff" reporter:datatype="link"/>
7857                         <field name="checkin_time" reporter:datatype="timestamp"/>
7858                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7859                         <field name="circ_staff" reporter:datatype="link"/>
7860                         <field name="desk_renewal" reporter:datatype="bool"/>
7861                         <field name="due_date" reporter:datatype="timestamp"/>
7862                         <field name="duration" reporter:datatype="interval"/>
7863                         <field name="duration_rule" reporter:datatype="link"/>
7864                         <field name="fine_interval" reporter:datatype="interval"/>
7865                         <field name="id" reporter:datatype="id" />
7866                         <field name="max_fine" reporter:datatype="money" />
7867                         <field name="max_fine_rule" reporter:datatype="link"/>
7868                         <field name="opac_renewal" reporter:datatype="bool"/>
7869                         <field name="phone_renewal" reporter:datatype="bool"/>
7870                         <field name="recurring_fine" reporter:datatype="money" />
7871                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7872                         <field name="renewal_remaining" reporter:datatype="int" />
7873             <field name="grace_period" reporter:datatype="interval" />
7874                         <field name="stop_fines" reporter:datatype="text"/>
7875                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7876                         <field name="target_copy" reporter:datatype="link"/>
7877                         <field name="usr" reporter:datatype="link"/>
7878                         <field name="xact_finish" reporter:datatype="timestamp" />
7879                         <field name="xact_start" reporter:datatype="timestamp" />
7880                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7881                         <field name="auto_renewal" reporter:datatype="bool"/>
7882                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7883                 </fields>
7884                 <links>
7885                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7886                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7887                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7888                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7889                 </links>
7890         </class>
7891         <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">
7892                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7893                         <field name="field" reporter:datatype="link"/>
7894                         <field name="id" reporter:datatype="id" />
7895                         <field name="source" reporter:datatype="link"/>
7896                         <field name="value" reporter:datatype="text"/>
7897                 </fields>
7898                 <links>
7899                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7900                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7901                 </links>
7902         </class>
7903         <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">
7904                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7905                         <field name="high" reporter:datatype="money" />
7906                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7907                         <field name="low" reporter:datatype="money" />
7908                         <field name="name" reporter:datatype="text"/>
7909                         <field name="normal" reporter:datatype="money" />
7910                         <field name="recurrence_interval" reporter:datatype="interval"/>
7911             <field name="grace_period" reporter:datatype="interval" />
7912                 </fields>
7913                 <links/>
7914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7915             <actions>
7916                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7917                 <retrieve/>
7918                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7919                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7920             </actions>
7921         </permacrud>
7922         </class>
7923         <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">
7924                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7925                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7926                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7927                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7928                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7929                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7930                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7931                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7932                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7933                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7934                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7935                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7936                 </fields>
7937                 <links>
7938                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7939                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7940                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7941                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7942                 </links>
7943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7944             <actions>
7945                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7946                     <context link="xact" jump="usr" field="home_ou"/>
7947                 </retrieve>
7948                         </actions>
7949                 </permacrud>
7950         </class>
7951         <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">
7952                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7953                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7954                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7955                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7956                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7957                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7958                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7959                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7960                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7961                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7962                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7963                 </fields>
7964                 <links>
7965                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7966                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7967                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7968                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7969                 </links>
7970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7971             <actions>
7972                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7973                     <context link="xact" jump="usr" field="home_ou"/>
7974                 </retrieve>
7975                         </actions>
7976                 </permacrud>
7977         </class>
7978         <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">
7979                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7980                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7981                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7982                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7983                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7984                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7985                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7986                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7987                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7988                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7989                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7990                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7991                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7992                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7993                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7994                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7995                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7996                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7997                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7998                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7999                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
8000                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8001                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
8002                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
8003                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8004                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
8005                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
8006                         <field reporter:label="Price" name="price" reporter:datatype="money" />
8007                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
8008                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
8009                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
8010                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
8011                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8012                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
8013                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
8014                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
8015                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8016                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8017                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8018                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
8019                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
8020                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
8021                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8022                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
8023                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
8024                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
8025                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
8026                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
8027                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
8028                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8029                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
8030                 </fields>
8031                 <links>
8032                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8033                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8034                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8035                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8036                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8037                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8038                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8039                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
8040                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
8041                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
8042                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
8043                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
8044                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
8045                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
8046                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
8047                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
8048                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8049                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
8050                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
8051                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
8052                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
8053                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
8054                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8055                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
8056                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
8057                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
8058                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8059                 </links>
8060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8061             <actions>
8062                 <create permission="CREATE_COPY">
8063                     <context link="call_number" field="owning_lib"/>
8064                 </create>
8065                 <retrieve/>
8066                 <update permission="UPDATE_COPY">
8067                     <context link="call_number" field="owning_lib"/>
8068                 </update>
8069                 <delete permission="DELETE_COPY">
8070                     <context link="call_number" field="owning_lib"/>
8071                 </delete>
8072             </actions>
8073         </permacrud>
8074         </class>
8075
8076         <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">
8077                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
8078             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
8079                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
8080                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
8081                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
8082                 </fields>
8083                 <links>
8084                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
8085                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8086                 </links>
8087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8088             <actions>
8089                                 <create/>
8090                                 <retrieve/>
8091                                 <update/>
8092                                 <delete/>
8093             </actions>
8094         </permacrud>
8095         </class>
8096
8097         <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">
8098                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
8099                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
8100                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
8101                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8102                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8103                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8104                         <field reporter:label="Event" name="event" reporter:datatype="text" />
8105                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
8106                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
8107                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
8108                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
8109                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
8110                 </fields>
8111                 <links>
8112                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
8113                 </links>
8114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8115             <actions>
8116                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8117                 <retrieve/>
8118                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8119                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
8120             </actions>
8121         </permacrud>
8122         </class>
8123
8124         <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">
8125                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
8126                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8127                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
8128                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8129                 </fields>
8130                 <links>
8131                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8132                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8133                 </links>
8134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8135             <actions>
8136                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8137                 <retrieve/>
8138                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8139                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
8140             </actions>
8141         </permacrud>
8142         </class>
8143
8144         <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">
8145                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
8146                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8147                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8148                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8149                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8150                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8151                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8152                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8153                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8154                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8155                 </fields>
8156                 <links>
8157                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8158                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8159                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8160                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8161                 </links>
8162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8163             <actions>
8164                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8165                     <context link="copy" field="circ_lib"/>
8166                 </create>
8167                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8168                     <context link="copy" field="circ_lib"/>
8169                                 </retrieve>
8170                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8171                     <context link="copy" field="circ_lib"/>
8172                                 </update>
8173                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8174                     <context link="copy" field="circ_lib"/>
8175                                 </delete>
8176             </actions>
8177         </permacrud>
8178         </class>
8179
8180         <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">
8181                 <fields oils_persist:primary="id">
8182                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8183                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8184                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8185                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8186                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8187                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8188                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8189                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8190                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8191                 </fields>
8192                 <links>
8193                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8194                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8195                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8196                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8197                 </links>
8198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8199             <actions>
8200                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8201                     <context link="copy" field="circ_lib"/>
8202                 </create>
8203                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8204                     <context link="copy" field="circ_lib"/>
8205                                 </retrieve>
8206                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8207                     <context link="copy" field="circ_lib"/>
8208                                 </update>
8209                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8210                     <context link="copy" field="circ_lib"/>
8211                                 </delete>
8212             </actions>
8213         </permacrud>
8214         </class>
8215
8216         <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">
8217                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
8218                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
8219                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
8220                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8221                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8222                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8223                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8224                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8225                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
8226                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
8227                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8228                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8229                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8230                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
8231                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
8232                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
8233                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
8234                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
8235                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
8236                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
8237                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
8238                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
8239                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
8240                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
8241                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8242                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
8243                 </fields>
8244                 <links>
8245                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8246                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8247                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8248                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8249                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8250                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8251                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8252                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8253                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8254                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8255                 </links>
8256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8257                         <actions>
8258                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8259                                 <retrieve />
8260                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8261                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8262                         </actions>
8263                 </permacrud>
8264         </class>
8265
8266         <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">
8267                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
8268                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
8269                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8270                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8271                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
8272                 </fields>
8273                 <links/>
8274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8275             <actions>
8276                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8277                 <retrieve/>
8278                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8279                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8280             </actions>
8281         </permacrud>
8282         </class>
8283         <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">
8284                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
8285                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
8286                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8287                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8288                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
8289                 </fields>
8290                 <links/>
8291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8292             <actions>
8293                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8294                 <retrieve/>
8295                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8296                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8297             </actions>
8298         </permacrud>
8299         </class>
8300         <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">
8301                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
8302                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8303                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8304                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8305                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8306                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8307                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
8308                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
8309                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
8310                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
8311                 </fields>
8312                 <links>
8313                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
8314                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
8315                 </links>
8316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8317             <actions>
8318                 <create permission="CREATE_PERM" global_required="true"/>
8319                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8320                 <update permission="UPDATE_PERM" global_required="true"/>
8321                 <delete permission="DELETE_PERM" global_required="true"/>
8322             </actions>
8323         </permacrud>
8324         </class>
8325         <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">
8326                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
8327                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8328                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
8329                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8330                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
8331                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8332                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8333                 </fields>
8334                 <links>
8335                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
8336                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8337                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8338                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
8339                 </links>
8340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8341                         <actions>
8342                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8343                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8344                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8345                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8346                         </actions>
8347                 </permacrud>
8348         </class>
8349         <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">
8350                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
8351                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
8352                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
8353                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
8354                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
8355                 </fields>
8356                 <links>
8357                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
8358                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
8359                 </links>
8360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8361             <actions>
8362                 <create permission="ADMIN_SURVEY">
8363                     <context link="question" jump="survey" field="owner"/>
8364                 </create>
8365                 <retrieve/>
8366                 <update permission="ADMIN_SURVEY">
8367                     <context link="question" jump="survey" field="owner"/>
8368                 </update>
8369                 <delete permission="ADMIN_SURVEY">
8370                     <context link="question" jump="survey" field="owner"/>
8371                 </delete>
8372             </actions>
8373         </permacrud>
8374         </class>
8375         <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">
8376                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
8377                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8378                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
8379                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
8380                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
8381                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
8382                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
8383                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
8384                 </fields>
8385                 <links>
8386                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
8387                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
8388                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
8389                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8390                 </links>
8391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8392                         <actions>
8393                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
8394                         </actions>
8395                 </permacrud>
8396         </class>
8397         <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">
8398                 <fields oils_persist:primary="usr" oils_persist:sequence="">
8399                         <field name="balance_owed" reporter:datatype="money" />
8400                         <field name="total_owed" reporter:datatype="money" />
8401                         <field name="total_paid" reporter:datatype="money" />
8402                         <field name="usr" reporter:datatype="link"/>
8403                 </fields>
8404                 <links>
8405                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8406                 </links>
8407         </class>
8408         <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">
8409                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
8410                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
8411                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
8412                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
8413                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
8414                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8415                 </fields>
8416                 <links>
8417                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8418                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
8419                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8420                 </links>
8421         </class>
8422         <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">
8423                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
8424                         <field name="field" reporter:datatype="link"/>
8425                         <field name="id" reporter:datatype="id" />
8426                         <field name="source" reporter:datatype="link"/>
8427                         <field name="value" reporter:datatype="text"/>
8428                 </fields>
8429                 <links>
8430                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8431                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8432                 </links>
8433         </class>
8434         <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">
8435                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
8436                         <field name="field" reporter:datatype="link"/>
8437                         <field name="id" reporter:datatype="id" />
8438                         <field name="source" reporter:datatype="link"/>
8439                         <field name="value" reporter:datatype="text"/>
8440                 </fields>
8441                 <links>
8442                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8443                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8444                 </links>
8445         </class>
8446         <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">
8447                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
8448                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
8449                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
8450                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
8451                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
8452                 </fields>
8453                 <links>
8454                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
8455                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
8456                 </links>
8457         </class>
8458         <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">
8459                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
8460                         <field name="depth" reporter:datatype="int" />
8461                         <field name="grantable" reporter:datatype="bool"/>
8462                         <field name="grp" reporter:datatype="link"/>
8463                         <field name="id" reporter:datatype="id" />
8464                         <field name="perm" reporter:datatype="link"/>
8465                 </fields>
8466                 <links>
8467                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8468                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8469                 </links>
8470         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8471             <actions>
8472                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
8473                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
8474                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
8475                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
8476             </actions>
8477         </permacrud>
8478         </class>
8479         <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">
8480                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8481                         <field name="items" oils_persist:virtual="true" />
8482                         <field name="btype" reporter:datatype="text"/>
8483                         <field name="id" reporter:datatype="id" />
8484                         <field name="name" reporter:datatype="text"/>
8485                         <field name="description" reporter:datatype="text"/>
8486                         <field name="owner" reporter:datatype="link"/>
8487                         <field name="pub" reporter:datatype="bool"/>
8488                         <field name="create_time" reporter:datatype="timestamp" />
8489                         <field name="owning_lib" reporter:datatype="org_unit" />
8490                 </fields>
8491                 <links>
8492                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8493                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8494                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8495                 </links>
8496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8497                         <actions>
8498                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8499                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8500                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8501                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8502                         </actions>
8503                 </permacrud>
8504         </class>
8505         <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">
8506                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8507                         <field name="id" reporter:datatype="id" />
8508                         <field name="bucket" reporter:datatype="link"/>
8509                         <field name="note" reporter:datatype="text" />
8510                 </fields>
8511                 <links>
8512                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8513                 </links>
8514         </class>
8515         <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">
8516                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8517                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8518                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8519                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8520                 </fields>
8521                 <links>
8522                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8523                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8524                 </links>
8525         </class>
8526         <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">
8527                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8528                         <field name="depth" reporter:datatype="int"/>
8529                         <field name="grantable" reporter:datatype="bool"/>
8530                         <field name="id" reporter:datatype="id" />
8531                         <field name="perm" reporter:datatype="link"/>
8532                         <field name="usr" reporter:datatype="link"/>
8533                 </fields>
8534                 <links>
8535                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8536                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8537                 </links>
8538         </class>
8539         <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">
8540                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8541                         <field name="object_id" reporter:datatype="text"/>
8542                         <field name="grantable" reporter:datatype="bool"/>
8543                         <field name="id" reporter:datatype="id" />
8544                         <field name="perm" reporter:datatype="link"/>
8545                         <field name="usr" reporter:datatype="link"/>
8546                         <field name="object_type" reporter:datatype="text"/>
8547                 </fields>
8548                 <links>
8549                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8550                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8551                 </links>
8552         </class>
8553         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8554                 <fields oils_persist:primary="id" oils_persist:sequence="">
8555                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8556                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8557                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8558                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8559                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8560                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8561                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8562                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8563                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8564                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8565                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8566                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8567                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8568                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8569                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8570                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8571                 </fields>
8572                 <links>
8573                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8574                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8575                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8576                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8577                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8578                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8579                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8580                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8581                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8582                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8583                 </links>
8584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8585             <actions>
8586                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8587                     <context link="xact" jump="usr" field="home_ou"/>
8588                 </retrieve>
8589                         </actions>
8590                 </permacrud>
8591         </class>
8592         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8593                 oils_obj:fieldmapper="money::aged_payment" 
8594                 oils_persist:tablename="money.aged_payment" 
8595                 reporter:label="Payments: Aged">
8596                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8597                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8598                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8599                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8600                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8601                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8602                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8603                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8604                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8605                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8606                         <field name="billing" reporter:datatype="link"/>
8607                 </fields>
8608                 <links>
8609                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8610                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8611                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8612                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8613                 </links>
8614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8615                         <actions>
8616                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8617                                         <context link="xact" field="usr_home_ou"/>
8618                                 </retrieve>
8619                         </actions>
8620                 </permacrud>
8621         </class>
8622         <class id="mallp" controller="open-ils.cstore" 
8623                 oils_obj:fieldmapper="money::all_payments" 
8624                 oils_persist:tablename="money.all_payments" 
8625                 oils_persist="readonly" reporter:core="true"
8626                 reporter:label="Payments: All">
8627                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8628                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8629                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8630                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8631                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8632                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8633                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8634                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8635                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8636                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8637                         <field name="billing" reporter:datatype="link"/>
8638                 </fields>
8639                 <links>
8640                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8641                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8642                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8643                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8644                 </links>
8645         </class>
8646
8647         <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">
8648                 <fields oils_persist:primary="id" oils_persist:sequence="">
8649                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8650                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8651                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8652                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8653                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8654                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8655                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8656                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8657                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8658                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8659                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8660                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8661                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8662                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8663                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8664                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8665                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8666                 </fields>
8667                 <links>
8668                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8669                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8670                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8671                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8672                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8673                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8674                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8675                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8676                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8677                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8678                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8679                 </links>
8680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8681                         <actions>
8682                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8683                                         <context link="xact" jump="usr" field="home_ou"/>
8684                                 </retrieve>
8685                         </actions>
8686                 </permacrud>
8687         </class>
8688         <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">
8689                 <fields oils_persist:primary="id" oils_persist:sequence="">
8690                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8691                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8692                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8693                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8694                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8695                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8696                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8697                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8698                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8699                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8700                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8701                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8702                 </fields>
8703                 <links>
8704                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8705                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8706                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8707                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8708                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8709                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8710                 </links>
8711         </class>
8712         <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">
8713                 <fields oils_persist:primary="id" oils_persist:sequence="">
8714                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8715                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8716                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8717                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8718                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8719                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8720                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8721                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8722                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8723                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8724                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8725                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8726                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8727                 </fields>
8728                 <links>
8729                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8730                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8731                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8732                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8733                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8734                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8735                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8736                 </links>
8737         </class>
8738         <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">
8739                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8740                         <field name="bucket" reporter:datatype="link"/>
8741                         <field name="id" reporter:datatype="id" />
8742                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8743                         <field name="create_time" reporter:datatype="timestamp" />
8744                         <field name="pos" reporter:datatype="int" />
8745                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8746                 </fields>
8747                 <links>
8748                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8749                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8750             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8751                 </links>
8752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8753                         <actions>
8754                                 <retrieve permission="ADMIN_COPY_BUCKET">
8755                     <context link="bucket" owning_lib="owning_lib"/>
8756                 </retrieve>
8757             </actions>
8758         </permacrud>
8759         </class>
8760         <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">
8761                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8762                         <field name="id" reporter:datatype="id" />
8763                         <field name="item" reporter:datatype="link"/>
8764                         <field name="note" reporter:datatype="text" />
8765                 </fields>
8766                 <links>
8767                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8768                 </links>
8769         </class>
8770         <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">
8771                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8772                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8773                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8774                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8775                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8776                 </fields>
8777                 <links>
8778                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8780                 </links>
8781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8782                         <actions>
8783                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8784                         </actions>
8785                 </permacrud>
8786         </class>
8787     <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">
8788         <fields oils_persist:primary="field">
8789             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8790             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8791             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8792         </fields>
8793         <links/>
8794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8795             <actions>
8796                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8797                 <retrieve />
8798                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8799                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8800             </actions>
8801         </permacrud>
8802     </class>
8803         <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">
8804                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8805                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8806                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8807                 </fields>
8808                 <links/>
8809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8810             <actions>
8811                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8812                 <retrieve/>
8813                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8814                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8815             </actions>
8816         </permacrud>
8817         </class>
8818
8819
8820         <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">
8821                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8822                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8823                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8824                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8825                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8826                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8827                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8828                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8829                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8830                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8831                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8832                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8833                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8834                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8835                 </fields>
8836                 <links>
8837                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8838                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8839                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8840                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8841                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8842                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8843                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8844                 </links>
8845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8846             <actions>
8847                 <create permission="TRANSIT_COPY">
8848                     <context link="target_copy" field="owner"/>
8849                 </create>
8850                 <retrieve/>
8851                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8852                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8853             </actions>
8854         </permacrud>
8855         </class>
8856         <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">
8857                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8858                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8859                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8860                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8861                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8862                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8863                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8864                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8865                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8866                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8867                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8868                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8869                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8870                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8871                 </fields>
8872                 <links>
8873                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8874                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8875                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8876                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8877                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8878                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8879                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8880                 </links>
8881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8882             <actions>
8883                 <create permission="TRANSIT_COPY" context_field="owner">
8884                     <context link="target_copy" field="circ_lib"/>
8885                 </create>
8886                 <retrieve/>
8887                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8888                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8889             </actions>
8890         </permacrud>
8891         </class>
8892         <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">
8893                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8894                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8895                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8896                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8897                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8898                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8899                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8900                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8901                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8902                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8903                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8904                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8905                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8906                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8907                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8908                 </fields>
8909                 <links>
8910                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8911                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8912                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8913                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8914                 </links>
8915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8916             <actions>
8917                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8918                     <context link="xact" jump="usr" field="home_ou"/>
8919                 </retrieve>
8920                         </actions>
8921                 </permacrud>
8922         </class>
8923         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8924                 oils_obj:fieldmapper="money::aged_billing" 
8925                 oils_persist:tablename="money.aged_billing" 
8926                 reporter:label="Aged Billing Line Item">
8927                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8928                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8929                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8930                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8931                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8932                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8933                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8934                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8935                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8936                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8937                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8938                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8939                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8940                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8941                 </fields>
8942                 <links>
8943                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8944                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8945                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8946                 </links>
8947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8948                         <actions>
8949                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8950                                         <context link="xact" field="usr_home_ou"/>
8951                                 </retrieve>
8952                         </actions>
8953                 </permacrud>
8954         </class>
8955         <class id="mallb" controller="open-ils.cstore" 
8956                 oils_obj:fieldmapper="money::all_billings" 
8957                 oils_persist:tablename="money.all_billings" 
8958                 oils_persist="readonly" reporter:label="All Billing Line Items">
8959                 <fields oils_persist:primary="id" oils_persist:sequence="">
8960                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8961                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8962                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8963                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8964                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8965                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8966                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8967                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8968                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8969                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8970                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8971                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8972                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8973                 </fields>
8974                 <links>
8975                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8976                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8977                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8978                 </links>
8979         </class>
8980         <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">
8981                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8982                         <field name="grp" />
8983                         <field name="id" reporter:datatype="id" />
8984                         <field name="usr" />
8985                 </fields>
8986                 <links>
8987                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8988                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8989                 </links>
8990         </class>
8991         <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">
8992                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8993                         <field name="id" reporter:datatype="id" />
8994                         <field name="fq_field" reporter:datatype="text"/>
8995                         <field name="identity_value" reporter:datatype="text"/>
8996                         <field name="translation" reporter:datatype="text"/>
8997                         <field name="string" reporter:datatype="text"/>
8998                 </fields>
8999                 <links>
9000                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
9001                 </links>
9002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9003             <actions>
9004                 <create permission="CREATE_TRANSLATION" global_required="true"/>
9005                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
9006                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
9007                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
9008             </actions>
9009         </permacrud>
9010         </class>
9011         <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">
9012                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
9013                         <field name="id" reporter:datatype="id" />
9014                         <field name="fm_class" reporter:datatype="text"/>
9015                         <field name="field" reporter:datatype="text"/>
9016                         <field name="owner" reporter:datatype="org_unit"/>
9017                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
9018                 </fields>
9019                 <links>
9020                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9021                 </links>
9022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9023             <actions>
9024                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9025                 <retrieve/>
9026                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9027                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9028             </actions>
9029         </permacrud>
9030         </class>
9031         <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">
9032                 <fields oils_persist:primary="code">
9033                         <field name="code" reporter:datatype="id" />
9034                         <field name="marc_code" reporter:datatype="text"/>
9035                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
9036                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9037                         <field name="rtl" reporter:datatype="bool"/>
9038                 </fields>
9039                 <links/>
9040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9041             <actions>
9042                 <create permission="CREATE_LOCALE" global_required="true"/>
9043                 <retrieve/>
9044                 <update permission="UPDATE_LOCALE" global_required="true"/>
9045                 <delete permission="DELETE_LOCALE" global_required="true"/>
9046             </actions>
9047         </permacrud>
9048         </class>
9049         <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">
9050                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
9051                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
9052                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
9053                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
9054                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
9055                 </fields>
9056                 <links>
9057                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9058                 </links>
9059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9060             <actions>
9061                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
9062                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
9063                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
9064                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
9065             </actions>
9066         </permacrud>
9067         </class>
9068
9069         <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">
9070                 <fields oils_persist:primary="id">
9071                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9072                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9073                 </fields>
9074                 <links/>
9075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9076             <actions>
9077                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9078                 <retrieve/>
9079                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9080                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9081             </actions>
9082         </permacrud>
9083         </class>
9084
9085         <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">
9086                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
9087                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9088                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9089                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9090                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9091                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9092                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9093                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9094                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9095                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9096                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9097                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9098                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9099                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9100                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9101                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9102                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9103                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9104                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9105                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9106                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9107                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9108                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9109                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9110                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9111                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9112                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9113                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9114                 </fields>
9115                 <links>
9116                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9117                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9118                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9119                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9120                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9121                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9122                 </links>
9123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9124             <actions>
9125                 <create permission="user_request.create">
9126                     <context link="usr" field="home_ou"/>
9127                                 </create>
9128                 <retrieve permission="user_request.view">
9129                     <context link="usr" field="home_ou"/>
9130                                 </retrieve>
9131                 <update permission="user_request.update">
9132                     <context link="usr" field="home_ou"/>
9133                                 </update>
9134                 <delete permission="user_request.delete">
9135                     <context link="usr" field="home_ou"/>
9136                                 </delete>
9137             </actions>
9138         </permacrud>
9139         </class>
9140
9141         <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">
9142         <oils_persist:source_definition><![CDATA[
9143             SELECT r.*, CASE
9144                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
9145                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
9146                         WHEN l.state = 'received' THEN 5 -- Received
9147                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
9148                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
9149                         WHEN l.id IS NOT NULL THEN 2 -- Pending
9150                         WHEN l.id IS NULL THEN 1 -- New
9151                         ELSE 0 -- Error
9152                     END AS request_status
9153                     ,u.home_ou
9154             FROM      acq.user_request r
9155             JOIN actor.usr u ON (r.usr = u.id)
9156             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
9157             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
9158             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
9159         ]]></oils_persist:source_definition>
9160                 <fields oils_persist:primary="id">
9161                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9162                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9163                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9164                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9165                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9166                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9167                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9168                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9169                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9170                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9171                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9172                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9173                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9174                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9175                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9176                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9177                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9178                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9179                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9180                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9181                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9182                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9183                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9184                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9185                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9186                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9187                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9188                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
9189                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
9190                 </fields>
9191                 <links>
9192                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9193                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9194                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9195                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9196                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9197                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9198                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
9199                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9200                 </links>
9201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9202             <actions>
9203                 <retrieve permission="user_request.view">
9204                     <context link="usr" field="home_ou"/>
9205                                 </retrieve>
9206             </actions>
9207         </permacrud>
9208         </class>
9209
9210         <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">
9211                 <fields oils_persist:primary="id">
9212                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9213                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9214                 </fields>
9215                 <links/>
9216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9217             <actions>
9218                 <retrieve/>
9219             </actions>
9220         </permacrud>
9221         </class>
9222
9223         <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">
9224                 <fields oils_persist:primary="code">
9225                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
9226                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9227                 </fields>
9228                 <links/>
9229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9230             <actions>
9231                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9232                 <retrieve/>
9233                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9234                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9235             </actions>
9236         </permacrud>
9237         </class>
9238
9239         <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">
9240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
9241                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
9242                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
9243                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
9244                         <field reporter:label="Ratio" name="ratio" />
9245                 </fields>
9246                 <links>
9247                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
9248                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
9249                 </links>
9250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9251                         <actions>
9252                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9253                                 <retrieve/>
9254                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9255                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9256                         </actions>
9257                 </permacrud>
9258         </class>
9259
9260         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
9261                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
9262                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9263                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9264                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
9265                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
9266                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
9267                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
9268                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
9269                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
9270                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
9271                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9272                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9273                         <field reporter:label="URL" name="url" reporter:datatype="text" />
9274                         <field reporter:label="Email" name="email" reporter:datatype="text" />
9275                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
9276                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
9277                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
9278                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
9279                         <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
9280                         <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
9281                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
9282                         <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
9283                         <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9284                         <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
9285                 </fields>
9286                 <links>
9287                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9288                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9289                         <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
9290                         <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
9291                         <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
9292                         <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
9293                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
9294                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
9295                         <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
9296                         <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
9297                         <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
9298                 </links>
9299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9300             <actions>
9301                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
9302                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
9303                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
9304                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
9305             </actions>
9306         </permacrud>
9307         </class>
9308
9309         <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">
9310                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
9311                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9312                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9313                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9314                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9315                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9316                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9317                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9318                 </fields>
9319                 <links>
9320                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9321                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9322                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9323                 </links>
9324         </class>
9325
9326         <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">
9327                 <fields oils_persist:primary="code">
9328                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
9329                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9330                 </fields>
9331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9332             <actions>
9333                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9334                 <retrieve/>
9335                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9336                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9337             </actions>
9338                 </permacrud>
9339         </class>
9340
9341         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
9342                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
9343                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
9344                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
9345                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9346                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
9347                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
9348                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
9349                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
9350                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
9351                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
9352                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
9353                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9354                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
9355                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
9356                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
9357                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
9358                 </fields>
9359                 <links>
9360                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
9361                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9362                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
9363                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
9364                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
9365                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
9366                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
9367                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
9368                 </links>
9369         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9370             <actions>
9371                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
9372                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
9373                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
9374                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
9375             </actions>
9376         </permacrud>
9377         </class>
9378
9379         <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">
9380                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
9381                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9382                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9383                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9384                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
9385                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
9386                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
9387                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9388                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
9389                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9390                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9391                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9392                 </fields>
9393                 <links>
9394                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9395                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9396                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9397                 </links>
9398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9399             <actions>
9400                 <create   permission="ADMIN_INVOICE">
9401                                         <context link="invoice" field="receiver"/>
9402                                 </create>
9403                 <retrieve permission="ADMIN_INVOICE">
9404                                         <context link="invoice" field="receiver"/>
9405                                 </retrieve>
9406                 <update   permission="ADMIN_INVOICE">
9407                                         <context link="invoice" field="receiver"/>
9408                                 </update>
9409                                 <delete   permission="ADMIN_INVOICE">
9410                                         <context link="invoice" field="receiver"/>
9411                                 </delete>
9412             </actions>
9413         </permacrud>
9414         </class>
9415
9416         <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">
9417                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
9418                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9419                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9420                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9421                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9422                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
9423                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
9424                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9425                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9426                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9427                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9428                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9429                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9430                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
9431                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9432                 </fields>
9433                 <links>
9434                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9435                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9436                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9437                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9438                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9439                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
9440                 </links>
9441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9442             <actions>
9443                 <create   permission="ADMIN_INVOICE">
9444                                         <context link="invoice" field="receiver"/>
9445                                 </create>
9446                 <retrieve permission="ADMIN_INVOICE">
9447                                         <context link="invoice" field="receiver"/>
9448                                 </retrieve>
9449                 <update   permission="ADMIN_INVOICE">
9450                                         <context link="invoice" field="receiver"/>
9451                                 </update>
9452                                 <delete   permission="ADMIN_INVOICE">
9453                                         <context link="invoice" field="receiver"/>
9454                                 </delete>
9455             </actions>
9456         </permacrud>
9457         </class>
9458
9459         <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">
9460                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
9461                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
9462                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9463                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9464                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9465                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9466                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9467                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text" oils_obj:required="true"/>
9468                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9469                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9470                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
9471                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
9472                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9473                 </fields>
9474                 <links>
9475                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9476                 </links>
9477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9478             <actions>
9479                 <create permission="ADMIN_PROVIDER">
9480                     <context link="provider" field="owner"/>
9481                 </create>
9482                 <retrieve permission="ADMIN_PROVIDER">
9483                     <context link="provider" field="owner"/>
9484                 </retrieve>
9485                 <update permission="ADMIN_PROVIDER">
9486                     <context link="provider" field="owner"/>
9487                 </update>
9488                 <delete permission="ADMIN_PROVIDER">
9489                     <context link="provider" field="owner"/>
9490                 </delete>
9491             </actions>
9492         </permacrud>
9493         </class>
9494
9495         <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">
9496                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9497                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9498                         <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
9499                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9500                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9501                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9502                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9503                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
9504         </fields>
9505                 <links>
9506                         <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
9507                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9508                 </links>
9509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9510             <actions>
9511                 <create permission="ADMIN_PROVIDER">
9512                     <context link="provider" field="owner"/>
9513                 </create>
9514                 <retrieve permission="ADMIN_PROVIDER">
9515                     <context link="provider" field="owner"/>
9516                 </retrieve>
9517                 <update permission="ADMIN_PROVIDER">
9518                     <context link="provider" field="owner"/>
9519                 </update>
9520                 <delete permission="ADMIN_PROVIDER">
9521                     <context link="provider" field="owner"/>
9522                 </delete>
9523             </actions>
9524         </permacrud>
9525     </class>
9526         <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">
9527                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9528                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9529                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9530                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9531                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9532                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9533                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
9534                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9535                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9536                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9537                         <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
9538                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9539                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9540                 </fields>
9541                 <links>
9542                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9543                 </links>
9544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9545             <actions>
9546                 <create permission="ADMIN_PROVIDER">
9547                     <context link="contact" jump='provider' field="owner"/>
9548                 </create>
9549                 <retrieve permission="ADMIN_PROVIDER">
9550                     <context link="contact" jump='provider' field="owner"/>
9551                 </retrieve>
9552                 <update permission="ADMIN_PROVIDER">
9553                     <context link="contact" jump='provider' field="owner"/>
9554                 </update>
9555                 <delete permission="ADMIN_PROVIDER">
9556                     <context link="contact" jump='provider' field="owner"/>
9557                 </delete>
9558             </actions>
9559         </permacrud>
9560         </class>
9561
9562         <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">
9563                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9564                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9565                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9566                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9567                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9568                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9569                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9570                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9571                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9572                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9573                 </fields>
9574                 <links>
9575                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9576                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9577                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9578                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9579                 </links>
9580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9581             <actions>
9582                 <create permission="ADMIN_ACQ_FUND">
9583                     <context link="src_fund" field="org"/>
9584                 </create>
9585                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9586                     <context link="src_fund" field="org"/>
9587                     <context link="dest_fund" field="org"/>
9588                 </retrieve>
9589                 <update permission="ADMIN_ACQ_FUND">
9590                     <context link="src_fund" field="org"/>
9591                 </update>
9592                 <delete permission="ADMIN_ACQ_FUND">
9593                     <context link="src_fund" field="org"/>
9594                 </delete>
9595             </actions>
9596         </permacrud>
9597         </class>
9598
9599         <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">
9600                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9601                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9602                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9603                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9604                 </fields>
9605                 <links>
9606             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9607                 </links>
9608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9609                         <actions>
9610                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9611                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9612                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9613                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9614                         </actions>
9615                 </permacrud>
9616         </class>
9617
9618         <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">
9619                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9620                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9621                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9622                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9623                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9624                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9625                 </fields>
9626                 <links>
9627                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9628                 </links>
9629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9630                         <actions>
9631                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9632                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9633                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9634                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9635                         </actions>
9636                 </permacrud>
9637         </class>
9638
9639         <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">
9640                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9641                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9642                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
9643                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true" />
9644                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true" />
9645                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9646                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true" />
9647                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9648                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9649                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9650                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9651                 </fields>
9652                 <links>
9653                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9654                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9655             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9656             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9657                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9658                 </links>
9659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9660             <actions>
9661                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9662                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9663                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9664                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9665             </actions>
9666         </permacrud>
9667         </class>
9668
9669         <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">
9670                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9671                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9672                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9673                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9674                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9675                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9676                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9677                 </fields>
9678                 <links>
9679                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9680                 </links>
9681                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9682                         <actions>
9683                                 <create permission="ADMIN_FUNDING_SOURCE">
9684                     <context link="funding_source" field="owner"/>
9685                 </create>
9686                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9687                     <context link="funding_source" field="owner"/>
9688                 </retrieve>
9689                                 <update permission="ADMIN_FUNDING_SOURCE">
9690                     <context link="funding_source" field="owner"/>
9691                 </update>
9692                                 <delete permission="ADMIN_FUNDING_SOURCE">
9693                     <context link="funding_source" field="owner"/>
9694                 </delete>
9695                         </actions>
9696                 </permacrud>
9697         </class>
9698
9699         <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">
9700                 <fields oils_persist:primary="id">
9701                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9702                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9703                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9704                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9705                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9706                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9707                 </fields>
9708                 <links>
9709                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9710                 </links>
9711         </class>
9712
9713         <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">
9714                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9715                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9716                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9717                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9718                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9719                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9720                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9721                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9722                         <field reporter:label="Debit Time" name="create_time" reporter:datatype="timestamp" />
9723                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9724                         <field reporter:label="Invoice Items" name="invoice_items" reporter:datatype="link" oils_persist:virtual="true"/>
9725                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9726                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9727                 </fields>
9728                 <links>
9729                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9730                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9731                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9732                         <link field="invoice_items" reltype="has_many" key="fund_debit" map="" class="acqii"/>
9733                         <link field="po_items" reltype="has_many" key="fund_debit" map="" class="acqpoi"/>
9734                         <link field="lineitem_details" reltype="has_many" key="fund_debit" map="" class="acqlid"/>
9735                 </links>
9736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9737                         <actions>
9738                                 <create permission="ADMIN_ACQ_FUND">
9739                     <context link="fund" field="org"/>
9740                 </create>
9741                                 <retrieve permission="ADMIN_ACQ_FUND">
9742                     <context link="fund" field="org"/>
9743                 </retrieve>
9744                                 <update permission="ADMIN_ACQ_FUND">
9745                     <context link="fund" field="org"/>
9746                 </update>
9747                                 <delete permission="ADMIN_ACQ_FUND">
9748                     <context link="fund" field="org"/>
9749                 </delete>
9750                         </actions>
9751                 </permacrud>
9752         </class>
9753
9754         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9755                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9756                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9757                         <field reporter:label="Owner" name="org" reporter:datatype="org_unit" oils_obj:required="true" />
9758                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
9759                         <field reporter:label="Year" name="year" reporter:datatype="int" oils_obj:required="true" />
9760                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" oils_obj:required="true" />
9761                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9762                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9763                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9764                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9765                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9766                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9767                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9768                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9769                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9770                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9771                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9772                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9773                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9774                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9775                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9776                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9777                 </fields>
9778                 <links>
9779                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9780                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9781             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9782             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9783             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9784             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9785             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9786             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9787             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9788             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9789             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9790                 </links>
9791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9792             <actions>
9793                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9794                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9795                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9796                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9797             </actions>
9798         </permacrud>
9799         </class>
9800
9801         <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">
9802                 <fields oils_persist:primary="fund">
9803                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9804                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9805                 </fields>
9806                 <links>
9807                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9808                 </links>
9809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9810             <actions>
9811                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9812                                         <context link="fund" field="org" />
9813                 </retrieve>
9814             </actions>
9815         </permacrud>
9816         </class>
9817
9818         <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">
9819                 <fields oils_persist:primary="fund">
9820                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9821                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9822                 </fields>
9823                 <links>
9824                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9825                 </links>
9826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9827             <actions>
9828                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9829                                         <context link="fund" field="org" />
9830                 </retrieve>
9831             </actions>
9832         </permacrud>
9833         </class>
9834
9835         <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">
9836                 <fields oils_persist:primary="fund">
9837                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9838                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9839                 </fields>
9840                 <links>
9841                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9842                 </links>
9843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9844             <actions>
9845                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9846                                         <context link="fund" field="org" />
9847                 </retrieve>
9848             </actions>
9849         </permacrud>
9850         </class>
9851
9852         <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">
9853                 <fields oils_persist:primary="fund">
9854                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9855                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9856                 </fields>
9857                 <links>
9858                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9859                 </links>
9860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9861             <actions>
9862                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9863                                         <context link="fund" field="org" />
9864                 </retrieve>
9865             </actions>
9866         </permacrud>
9867         </class>
9868
9869         <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">
9870                 <fields oils_persist:primary="fund">
9871                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9872                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9873                 </fields>
9874                 <links>
9875                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9876                 </links>
9877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9878             <actions>
9879                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9880                                         <context link="fund" field="org" />
9881                 </retrieve>
9882             </actions>
9883         </permacrud>
9884         </class>
9885
9886    <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">
9887         <fields oils_persist:primary="fund">
9888             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9889             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9890         </fields>
9891         <links>
9892             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9893         </links>
9894     </class>
9895
9896    <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">
9897         <fields oils_persist:primary="fund">
9898             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9899             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9900         </fields>
9901         <links>
9902             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9903         </links>
9904     </class>
9905
9906    <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">
9907         <fields oils_persist:primary="fund">
9908             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9909             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9910         </fields>
9911         <links>
9912             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9913         </links>
9914     </class>
9915
9916    <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">
9917         <fields oils_persist:primary="fund">
9918             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9919             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9920         </fields>
9921         <links>
9922             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9923         </links>
9924     </class>
9925
9926    <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">
9927         <fields oils_persist:primary="fund">
9928             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9929             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9930         </fields>
9931         <links>
9932             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9933         </links>
9934     </class>
9935
9936         <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">
9937                 <fields oils_persist:primary="funding_source">
9938                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9939                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9940                 </fields>
9941                 <links>
9942                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9943                 </links>
9944         </class>
9945
9946         <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">
9947                 <fields oils_persist:primary="funding_source">
9948                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9949                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9950                 </fields>
9951                 <links>
9952                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9953                 </links>
9954         </class>
9955
9956         <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">
9957                 <fields oils_persist:primary="funding_source">
9958                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9959                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9960                 </fields>
9961                 <links>
9962                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9963                 </links>
9964         </class>
9965
9966         <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">
9967                 <fields oils_persist:primary="fund">
9968                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9969                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9970                 </fields>
9971                 <links>
9972                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9973                 </links>
9974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9975             <actions>
9976                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9977                                         <context link="fund" field="org" />
9978                 </retrieve>
9979             </actions>
9980         </permacrud>
9981     </class>
9982     <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">
9983         <oils_persist:source_definition><![CDATA[
9984             SELECT
9985                 acqf.*,
9986                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9987                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9988                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9989                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9990             FROM
9991                 acq.fund acqf
9992                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9993                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9994                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9995                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9996         ]]></oils_persist:source_definition>
9997         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9998             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9999             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
10000             <field reporter:label="Name" name="name" reporter:datatype="text" />
10001             <field reporter:label="Year" name="year" reporter:datatype="int" />
10002             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
10003             <field reporter:label="Code" name="code" reporter:datatype="text" />
10004             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
10005             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
10006             <field reporter:label="Active" name="active" reporter:datatype="bool" />
10007             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
10008             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
10009
10010             <!-- non fund-native fields -->
10011             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
10012             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
10013             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
10014             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
10015         </fields>
10016         <links>
10017             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
10018             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10019             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
10020         </links>
10021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10022             <actions>
10023                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
10024             </actions>
10025         </permacrud>
10026         </class>
10027         <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">
10028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
10029                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
10030                         <field reporter:label="Fund" name="fund" reporter:datatype="link" oils_obj:required="true" />
10031                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
10032                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
10033                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" oils_obj:required="true" />
10034                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10035                         <field reporter:label="Allocation Time" name="create_time" reporter:datatype="timestamp" />
10036                 </fields>
10037                 <links>
10038                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
10039                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10040                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
10041                 </links>
10042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10043                         <actions>
10044                                 <create permission="ADMIN_ACQ_FUND">
10045                     <context link="fund" field="org"/>
10046                 </create>
10047                                 <retrieve permission="ADMIN_ACQ_FUND">
10048                     <context link="fund" field="org"/>
10049                 </retrieve>
10050                                 <update permission="ADMIN_ACQ_FUND">
10051                     <context link="fund" field="org"/>
10052                 </update>
10053                                 <delete permission="ADMIN_ACQ_FUND">
10054                     <context link="fund" field="org"/>
10055                 </delete>
10056                         </actions>
10057                 </permacrud>
10058         </class>
10059
10060     <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">
10061         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
10062             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
10063             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
10064             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
10065             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
10066             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
10067             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
10068             <field reporter:label="Note" name="note" reporter:datatype="text" />
10069             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
10070         </fields>
10071         <links>
10072             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
10073             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10074             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
10075         </links>
10076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10077                         <actions>
10078                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10079                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10080                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10081                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10082                         </actions>
10083                 </permacrud>
10084     </class>
10085
10086         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
10087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
10088                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
10089                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10090                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
10091                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
10092                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10093                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10094                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
10095                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
10096                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10097                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10098                 </fields>
10099                 <links>
10100                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10101                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10102                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10104                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
10105                 </links>
10106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10107                         <actions>
10108                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
10109                         </actions>
10110                 </permacrud>
10111         </class>
10112
10113         <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">
10114                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
10115                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
10116                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
10117                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10118                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
10119                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
10120                 </fields>
10121                 <links>
10122                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10123                 </links>
10124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10125                         <actions>
10126                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10127                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
10128                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10129                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10130                         </actions>
10131                 </permacrud>
10132         </class>
10133
10134         <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">
10135                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
10136                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
10137                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10138                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10139                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10140                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10141                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10142                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
10143                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10144                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10145                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
10146                         <field reporter:label="Name" name="name" reporter:datatype="text" />
10147                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10148                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10149                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
10150                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
10151                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
10152                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
10153                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
10154                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
10155                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
10156                 </fields>
10157                 <links>
10158                         <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
10159                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10160                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10161                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10162                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
10163                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10164                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
10165                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
10166                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
10167                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10168                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10169                 </links>
10170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10171                         <actions>
10172                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10173                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10174                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10175                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10176                         </actions>
10177                 </permacrud>
10178         </class>
10179
10180         <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">
10181                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
10182                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10183                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10184                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10185                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10186                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10187                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10188                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10189                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10190                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10191                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10192                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10193                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10194                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
10195                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10196                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10197                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10198                 </fields>
10199                 <links>
10200                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10201                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10202                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10203                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10204                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10205                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10206                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10207                 </links>
10208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10209             <actions>
10210                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10211             </actions>
10212                 </permacrud>
10213         </class>
10214
10215         <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">
10216                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
10217                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
10218                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10219                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10220                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10221                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10222                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10223                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
10224                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10225                 </fields>
10226                 <links>
10227                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10228                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10229                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10230                 </links>
10231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10232             <actions>
10233                 <create permission="CREATE_PURCHASE_ORDER">
10234                     <context link="purchase_order" field="ordering_agency"/>
10235                 </create>
10236                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10237                     <context link="purchase_order" field="ordering_agency"/>
10238                 </retrieve>
10239                 <update permission="CREATE_PURCHASE_ORDER">
10240                     <context link="purchase_order" field="ordering_agency"/>
10241                 </update>
10242                 <delete permission="CREATE_PURCHASE_ORDER">
10243                     <context link="purchase_order" field="ordering_agency"/>
10244                 </delete>
10245             </actions>
10246                 </permacrud>
10247         </class>
10248
10249         <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">
10250                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
10251                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10252                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10253                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10254                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
10255                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
10256                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
10257                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10258                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
10259                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10260                         <field reporter:label="Target" name="target" reporter:datatype="int" />
10261                 </fields>
10262                 <links>
10263                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10264                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10265                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
10266                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10267                 </links>
10268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10269             <actions>
10270                 <create permission="CREATE_PURCHASE_ORDER">
10271                     <context link="purchase_order" field="ordering_agency"/>
10272                 </create>
10273                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10274                     <context link="purchase_order" field="ordering_agency"/>
10275                 </retrieve>
10276                 <update permission="CREATE_PURCHASE_ORDER">
10277                     <context link="purchase_order" field="ordering_agency"/>
10278                 </update>
10279                 <delete permission="CREATE_PURCHASE_ORDER">
10280                     <context link="purchase_order" field="ordering_agency"/>
10281                 </delete>
10282             </actions>
10283                 </permacrud>
10284         </class>
10285
10286         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
10287                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
10288                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
10289                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
10290                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
10291                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10292                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10293                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10294                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10295                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
10296                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
10297                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
10298                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
10299                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10300                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10301                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10302                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
10303                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10304                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10305                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10306                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
10307                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
10308                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
10309                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
10310                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
10311                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
10312                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
10313                 </fields>
10314                 <links>
10315                         <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
10316                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10317                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10318                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10319                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10320                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10321                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10322                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10323                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
10324                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
10325                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
10326                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10327                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
10328                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10329                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
10330                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
10331                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10332                 </links>
10333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10334                         <actions>
10335                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10336                                         <context link="purchase_order" field="ordering_agency"/>
10337                                         <context link="picklist" field="org_unit"/>
10338                                 </retrieve>
10339                         </actions>
10340                 </permacrud>
10341         </class>
10342
10343         <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">
10344                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
10345                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10346                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10347                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10348                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
10349                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10350                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10351                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
10352                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10353                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10354                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
10355                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
10356                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10357                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10358                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
10359                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
10360                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
10361                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10362                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
10363                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10364                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10365                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10366                 </fields>
10367                 <links>
10368                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
10369                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10370                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10371                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10372                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10373                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10374                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10375                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10376                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10377                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10378                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10379                 </links>
10380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10381                         <actions>
10382                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10383                                         <context link="purchase_order" field="ordering_agency"/>
10384                                         <context link="picklist" field="org_unit"/>
10385                                 </retrieve>
10386                         </actions>
10387                 </permacrud>
10388         </class>
10389
10390         <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">
10391                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
10392                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
10393                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10394                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10395                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10396                 </fields>
10397                 <links>
10398                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10399                 </links>
10400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10401                         <actions>
10402                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10403                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
10404                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10405                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10406                         </actions>
10407                 </permacrud>
10408         </class>
10409
10410         <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">
10411                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
10412                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
10413                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
10414                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10415                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10416                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10417                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10418                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
10419                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
10420                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10421                 </fields>
10422                 <links>
10423                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10424                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10425                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10426                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
10427                 </links>
10428         </class>
10429
10430         <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">
10431                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
10432                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
10433                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
10434                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
10435                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
10436                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
10437                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
10438                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
10439                 </fields>
10440                 <links>
10441                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10442                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
10443                 </links>
10444         </class>
10445
10446         <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">
10447                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
10448                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
10449                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
10450                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
10451                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
10452                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
10453                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
10454                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
10455                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
10456                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
10457                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10458                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
10459                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
10460                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10461                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
10462                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10463                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
10464                 </fields>
10465                 <links>
10466                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10467                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
10468                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10469                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10470                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10471                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10472                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10473                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10474                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
10475                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
10476                 </links>
10477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10478             <actions>
10479                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10480                     <context link="lineitem" jump="purchase_order" field="ordering_agency"/>
10481                     <context link="lineitem" jump="picklist" field="org_unit"/>
10482                 </retrieve>
10483             </actions>
10484         </permacrud>
10485         </class>
10486
10487         <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">
10488                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10489                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10490                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10491                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10492                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10493                 </fields>
10494                 <links/>
10495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10496                         <actions>
10497                                 <retrieve />
10498                         </actions>
10499                 </permacrud>
10500         </class>
10501
10502         <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">
10503                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10504                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10505                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10506                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10507                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10508                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10509             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10510                 </fields>
10511                 <links/>
10512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10513             <actions>
10514                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10515                 <retrieve />
10516                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10517                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10518             </actions>
10519         </permacrud>
10520         </class>
10521
10522         <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">
10523                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10524                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10525                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10526                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10527                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10528                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10529                 </fields>
10530                 <links/>
10531         </class>
10532         <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">
10533                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10534                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10535                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10536                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10537                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10538                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10539                 </fields>
10540                 <links>
10541                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10542                 </links>
10543         </class>
10544
10545         <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">
10546             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10547                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10548                 <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true" />
10549                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
10550                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
10551                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10552                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10553         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10554
10555             </fields>
10556             <links>
10557                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10558             </links>
10559             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10560                 <actions>
10561                     <create permission="ADMIN_PROVIDER">
10562                         <context link="provider" field="owner"/>
10563                     </create>
10564                     <retrieve permission="ADMIN_PROVIDER">
10565                         <context link="provider" field="owner"/>
10566                     </retrieve>
10567                     <update permission="ADMIN_PROVIDER">
10568                         <context link="provider" field="owner"/>
10569                     </update>
10570                     <delete permission="ADMIN_PROVIDER">
10571                         <context link="provider" field="owner"/>
10572                     </delete>
10573                 </actions>
10574             </permacrud>
10575         </class>
10576         
10577         <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">
10578             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10579                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10580                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10581                 <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
10582                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
10583             </fields>
10584             <links>
10585                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10586             </links>
10587             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10588                 <actions>
10589                     <create permission="ADMIN_PROVIDER">
10590                         <context link="provider" field="owner"/>
10591                     </create>
10592                     <retrieve permission="ADMIN_PROVIDER">
10593                         <context link="provider" field="owner"/>
10594                     </retrieve>
10595                     <update permission="ADMIN_PROVIDER">
10596                         <context link="provider" field="owner"/>
10597                     </update>
10598                     <delete permission="ADMIN_PROVIDER">
10599                         <context link="provider" field="owner"/>
10600                     </delete>
10601                 </actions>
10602             </permacrud>
10603         </class>
10604         
10605         <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">
10606             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10607                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10608                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10609                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10610                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10611                 </fields>
10612                 <links/>
10613         </class>
10614
10615         <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">
10616                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10617                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10618                         <field name="label"         reporter:datatype="text"      reporter:label="Label" oils_obj:required="true"/>
10619                         <field name="host"          reporter:datatype="text"      reporter:label="Host" oils_obj:required="true"/>
10620                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10621                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10622                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10623                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10624                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner" oils_obj:required="true"/>
10625                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10626                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider" oils_obj:required="true"/>
10627                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10628                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10629                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10630                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10631                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes" oils_obj:required="true"/>
10632                 </fields>
10633                 <links>
10634                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10635                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10636                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10637                 </links>
10638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10639             <actions>
10640                 <create permission="ADMIN_PROVIDER">
10641                     <context link="provider" field="owner"/>
10642                 </create>
10643                 <retrieve permission="ADMIN_PROVIDER">
10644                     <context link="provider" field="owner"/>
10645                 </retrieve>
10646                 <update permission="ADMIN_PROVIDER">
10647                     <context link="provider" field="owner"/>
10648                 </update>
10649                 <delete permission="ADMIN_PROVIDER">
10650                     <context link="provider" field="owner"/>
10651                 </delete>
10652             </actions>
10653         </permacrud>
10654         </class>
10655
10656         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10657                 oils_obj:fieldmapper="acq::edi_attr" 
10658                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10659                 <fields oils_persist:primary="key">
10660                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10661                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10662                 </fields>
10663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10664             <actions>
10665                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10666                 <retrieve/>
10667                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10668                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10669             </actions>
10670         </permacrud>
10671         </class>
10672         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10673                 oils_obj:fieldmapper="acq::edi_attr_set" 
10674                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10675                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10676                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10677                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10678                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10679                         <field name="edi_accounts" reporter:datatype="link" oils_persist:virtual="true" reporter:label="EDI Accounts"/>
10680                 </fields>
10681                 <links>
10682                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10683                         <link field="edi_accounts" reltype="has_many" key="attr_set" map="" class="acqedi"/>
10684                 </links>
10685         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10686             <actions>
10687                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10688                 <retrieve/>
10689                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10690                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10691             </actions>
10692         </permacrud>
10693         </class>
10694         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10695                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10696                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10697                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10698                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10699                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10700                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10701                 </fields>
10702                 <links>
10703                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10704                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10705                 </links>
10706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10707             <actions>
10708                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10709                 <retrieve/>
10710                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10711                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10712             </actions>
10713         </permacrud>
10714         </class>
10715
10716
10717         <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">
10718                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10719                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10720                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10721                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10722                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10723                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10724                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10725                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10726                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10727                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10728                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10729                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10730                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10731                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10732                 </fields>
10733                 <links>
10734                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10735                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10736                 </links>
10737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10738             <actions>
10739                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10740                     <context link="account" jump="provider" field="owner"/>
10741                 </retrieve>
10742                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10743                     <context link="account" jump="provider" field="owner"/>
10744                 </update>
10745                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10746                     <context link="account" jump="provider" field="owner"/>
10747                 </delete>
10748             </actions>
10749         </permacrud>
10750         </class>
10751
10752
10753         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10754                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10755                         <field name="id" reporter:datatype="id" />
10756                         <field name="parent" reporter:datatype="link"/>
10757                         <field name="owner" reporter:datatype="link"/>
10758                         <field name="create_time" reporter:datatype="timestamp"/>
10759                         <field name="name" reporter:datatype="text"/>
10760                         <field name="shared" reporter:datatype="bool"/>
10761                         <field name="share_with" reporter:datatype="link"/>
10762                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10763                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10764                 </fields>
10765                 <links>
10766                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10767                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10768                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10769                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10770                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10771                 </links>
10772         </class>
10773         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10774                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10775                         <field name="id" reporter:datatype="id" />
10776                         <field name="parent" reporter:datatype="link"/>
10777                         <field name="owner" reporter:datatype="link"/>
10778                         <field name="create_time" reporter:datatype="timestamp"/>
10779                         <field name="name" reporter:datatype="text"/>
10780                         <field name="shared" reporter:datatype="bool"/>
10781                         <field name="share_with" reporter:datatype="link"/>
10782                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10783                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10784                 </fields>
10785                 <links>
10786                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10787                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10788                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10789                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10790                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10791                 </links>
10792         </class>
10793         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10794                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10795                         <field name="id" reporter:datatype="id" />
10796                         <field name="parent" reporter:datatype="link"/>
10797                         <field name="owner" reporter:datatype="link"/>
10798                         <field name="create_time" reporter:datatype="timestamp"/>
10799                         <field name="name" reporter:datatype="text"/>
10800                         <field name="shared" reporter:datatype="bool"/>
10801                         <field name="share_with" reporter:datatype="link"/>
10802                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10803                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10804                 </fields>
10805                 <links>
10806                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10807                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10808                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10809                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10810                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10811                 </links>
10812         </class>
10813         <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">
10814                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10815                         <field name="id" reporter:datatype="id" />
10816                         <field name="owner" reporter:datatype="link"/>
10817                         <field name="create_time" reporter:datatype="timestamp"/>
10818                         <field name="name" reporter:datatype="text"/>
10819                         <field name="data" reporter:datatype="text"/>
10820                         <field name="folder" reporter:datatype="link"/>
10821                         <field name="description" reporter:datatype="text"/>
10822                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10823                 </fields>
10824                 <links>
10825                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10826                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10827                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10828                 </links>
10829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10830             <actions>
10831                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10832                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10833                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10834                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10835             </actions>
10836         </permacrud>
10837         </class>
10838         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10839                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10840                         <field name="id" reporter:datatype="id" />
10841                         <field name="owner" reporter:datatype="link"/>
10842                         <field name="create_time" reporter:datatype="timestamp"/>
10843                         <field name="template" reporter:datatype="link"/>
10844                         <field name="data" reporter:datatype="text"/>
10845                         <field name="folder" reporter:datatype="link"/>
10846                         <field name="recur" reporter:datatype="bool"/>
10847                         <field name="recurrence" reporter:datatype="interval"/>
10848                         <field name="name" reporter:datatype="text"/>
10849                         <field name="description" reporter:datatype="text"/>
10850                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10851                 </fields>
10852                 <links>
10853                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10854                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10855                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10856                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10857                 </links>
10858         </class>
10859         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10860                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10861                         <field name="id" reporter:datatype="id" />
10862                         <field name="runner" reporter:datatype="link"/>
10863                         <field name="start_time" reporter:datatype="timestamp"/>
10864                         <field name="complete_time" reporter:datatype="timestamp"/>
10865                         <field name="run_time" reporter:datatype="timestamp"/>
10866                         <field name="email" reporter:datatype="text"/>
10867                         <field name="excel_format" reporter:datatype="bool"/>
10868                         <field name="csv_format" reporter:datatype="bool"/>
10869                         <field name="html_format" reporter:datatype="bool"/>
10870                         <field name="error_code" reporter:datatype="int"/>
10871                         <field name="error_text" reporter:datatype="text"/>
10872                         <field name="report" reporter:datatype="link"/>
10873                         <field name="folder" reporter:datatype="link"/>
10874                         <field name="chart_pie" reporter:datatype="bool"/>
10875                         <field name="chart_bar" reporter:datatype="bool"/>
10876                         <field name="chart_line" reporter:datatype="bool"/>
10877                 </fields>
10878                 <links>
10879                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10880                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10881                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10882                 </links>
10883         </class>
10884         <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">
10885                 <fields oils_persist:primary="id">
10886                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10887                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10888                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10889                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10890                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10891                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10892                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10893                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10894                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10895                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10896                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10897                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10898                 </fields>
10899                 <links>
10900                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10901                 </links>
10902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10903                         <actions>
10904                                 <retrieve />
10905                         </actions>
10906                 </permacrud>
10907         </class>
10908         <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">
10909                 <fields oils_persist:primary="id">
10910                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10911                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10912                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10913                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10914                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10915                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10916                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10917                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10918                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10919                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10920                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10921                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10922                 </fields>
10923                 <links>
10924                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10925                 </links>
10926         </class>
10927         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10928                 <fields oils_persist:primary="id">
10929                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10930                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10931                         <field reporter:label="Fingerprint" name="fingerprint" />
10932                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10933                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10934                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10935                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10936                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10937                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10938                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10939                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10940                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10941                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10942                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10943                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10944                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10945                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10946                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10947                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10948                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10949                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10950                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10951                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10952                 </fields>
10953                 <links>
10954                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10955                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10956                 </links>
10957         </class>
10958         <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">
10959                 <fields oils_persist:primary="id">
10960                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10961                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10962                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10963                         <field reporter:label="Detailed Age Division" name="age_division" reporter:datatype="text"/>
10964                 </fields>
10965                 <links>
10966                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10967                 </links>
10968         </class>
10969         <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">
10970                 <fields oils_persist:primary="id">
10971                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10972                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10973                 </fields>
10974                 <links>
10975                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10976                 </links>
10977         </class>
10978         <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">
10979                 <fields oils_persist:primary="id">
10980                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10981                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10982                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10983                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10984                 </fields>
10985                 <links>
10986                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10987                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10988                 </links>
10989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10990                         <actions>
10991                                 <retrieve permission="VIEW_HOLD">
10992                                         <context link="id" field="pickup_lib"/>
10993                                 </retrieve>
10994                         </actions>
10995                 </permacrud>
10996         </class>
10997         <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">
10998                 <fields oils_persist:primary="xact">
10999                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
11000                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
11001                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
11002                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
11003                 </fields>
11004                 <links>
11005                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
11006                 </links>
11007         </class>
11008         <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">
11009                 <fields oils_persist:primary="xact">
11010                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
11011                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
11012                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
11013                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
11014                 </fields>
11015                 <links>
11016                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
11017                 </links>
11018         </class>
11019         <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)">
11020                 <fields oils_persist:primary="id">
11021                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
11022                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
11023                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
11024                 </fields>
11025                 <links>
11026                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11027                 </links>
11028         </class>
11029         <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">
11030                 <fields oils_persist:primary="id">
11031                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
11032                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
11033                 </fields>
11034                 <links>
11035                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11036                 </links>
11037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11038                         <actions>
11039                                 <retrieve permission="STAFF_LOGIN">
11040                                         <context link="id" field="circ_lib"/>
11041                                 </retrieve>
11042                         </actions>
11043                 </permacrud>
11044         </class>
11045         <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">
11046                 <fields oils_persist:primary="bibid">
11047                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
11048                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
11049                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
11050                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
11051                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
11052                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
11053                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
11054                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
11055                 </fields>
11056                 <links>
11057                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
11058                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11059                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11060                 </links>
11061         </class>
11062         <class id="rcsv" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::copy_statistics_view" oils_persist:tablename="reporter.copy_statistics_view" reporter:label="Item Statistics View">
11063                 <fields oils_persist:primary="copy_id">
11064                         <field reporter:label="Item ID" name="copy_id" reporter:datatype="link"/>
11065                         <field reporter:label="Owning Library Link" name="owning_lib_id" reporter:datatype="link"/>
11066                         <field reporter:label="Consortium: Last Circulation Date" name="consortium_last_circ_date" reporter:datatype="timestamp"/>
11067                         <field reporter:label="System: Last Circulation Date" name="system_last_circ_date" reporter:datatype="timestamp"/>
11068                         <field reporter:label="Branch: Last Circulation Date" name="branch_last_circ_date" reporter:datatype="timestamp"/>
11069                         <field reporter:label="Consortium: Last Checkin Date" name="consortium_last_checkin_date" reporter:datatype="timestamp"/>
11070                         <field reporter:label="System: Last Checkin Date" name="system_last_checkin_date" reporter:datatype="timestamp"/>
11071                         <field reporter:label="Branch: Last Checkin Date" name="branch_last_checkin_date" reporter:datatype="timestamp"/>
11072                         <field reporter:label="Consortium: Last Due Date" name="consortium_last_due_date" reporter:datatype="timestamp"/>
11073                         <field reporter:label="System: Last Due Date" name="system_last_due_date" reporter:datatype="timestamp"/>
11074                         <field reporter:label="Branch: Last Due Date" name="branch_last_due_date" reporter:datatype="timestamp"/>
11075                         <field reporter:label="Consortium: Month-to-Date Circulation" name="consortium_month_to_date_circ" reporter:datatype="int"/>
11076                         <field reporter:label="System: Month-to-Date Circulation" name="system_month_to_date_circ" reporter:datatype="int"/>
11077                         <field reporter:label="Branch: Month-to-Date Circulation" name="branch_month_to_date_circ" reporter:datatype="int"/>
11078                         <field reporter:label="Consortium: Year-to-Date Circulation" name="consortium_year_to_date_circ" reporter:datatype="int"/>
11079                         <field reporter:label="System: Year-to-Date Circulation" name="system_year_to_date_circ" reporter:datatype="int"/>
11080                         <field reporter:label="Branch: Year-to-Date Circulation" name="branch_year_to_date_circ" reporter:datatype="int"/>
11081                         <field reporter:label="Consortium: Lifetime Circulation" name="consortium_lifetime_circ" reporter:datatype="int"/>
11082                         <field reporter:label="System: Lifetime Circulation" name="system_lifetime_circ" reporter:datatype="int"/>
11083                         <field reporter:label="Branch: Lifetime Circulation" name="branch_lifetime_circ" reporter:datatype="int"/>
11084                         <field reporter:label="Consortium: Current Title Hold Count" name="consortium_current_title_hold_count" reporter:datatype="int"/>
11085                         <field reporter:label="System: Current Title Hold Count" name="system_current_title_hold_count" reporter:datatype="int"/>
11086                         <field reporter:label="Branch: Current Title Hold Count" name="branch_current_title_hold_count" reporter:datatype="int"/>
11087                         <field reporter:label="Consortium: Lifetime Title Hold Count" name="consortium_lifetime_holds" reporter:datatype="int"/>
11088                         <field reporter:label="System: Lifetime Title Hold Count" name="system_lifetime_holds" reporter:datatype="int"/>
11089                         <field reporter:label="Branch: Lifetime Title Hold Count" name="branch_lifetime_holds" reporter:datatype="int"/>
11090                         <field reporter:label="Consortium: Lifetime Transits" name="consortium_lifetime_transits" reporter:datatype="int"/>
11091                         <field reporter:label="System: Lifetime Outbound Transits" name="system_lifetime_transits" reporter:datatype="int"/>
11092                         <field reporter:label="Branch: Lifetime Outbound Transits" name="branch_lifetime_transits" reporter:datatype="int"/>
11093                 </fields>
11094                 <links>
11095                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11096                         <link field="owning_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11097                 </links>
11098         </class>
11099         <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">
11100                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
11101                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
11102                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
11103                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
11104                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
11105                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
11106                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
11107                 </fields>
11108                 <links>
11109                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11110                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
11111                 </links>
11112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11113                         <actions>
11114                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11115                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11116                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11117                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11118                         </actions>
11119                 </permacrud>
11120         </class>
11121         <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">
11122                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
11123                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
11124                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
11125                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
11126                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11127                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11128                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
11129                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
11130                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
11131                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
11132                 </fields>
11133                 <links>
11134                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11135                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11136                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
11137                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11138                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
11139                 </links>
11140                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11141                         <actions>
11142                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
11143                                         <context link="formula" field="owner"/>
11144                                 </create>
11145                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
11146                                         <context link="formula" field="owner"/>
11147                                 </retrieve>
11148                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
11149                                         <context link="formula" field="owner"/>
11150                                 </update>
11151                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
11152                                         <context link="formula" field="owner"/>
11153                                 </delete>
11154                         </actions>
11155                 </permacrud>
11156         </class>
11157
11158         <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">
11159                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
11160                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11161                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11162                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11163                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
11164                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11165                 </fields>
11166                 <links>
11167                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11168                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11169                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11170                 </links>
11171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11172                         <actions>
11173                                 <create permission="CREATE_PURCHASE_ORDER">
11174                                         <context link="formula" field="owner"/>
11175                 </create>
11176                                 <retrieve permission="CREATE_PURCHASE_ORDER">
11177                                         <context link="formula" field="owner"/>
11178                 </retrieve>
11179                                 <update permission="CREATE_PURCHASE_ORDER">
11180                                         <context link="formula" field="owner"/>
11181                 </update>
11182                                 <delete permission="CREATE_PURCHASE_ORDER">
11183                                         <context link="formula" field="owner"/>
11184                 </delete>
11185                         </actions>
11186                 </permacrud>
11187         </class>
11188
11189         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
11190                 <fields oils_persist:primary="id">
11191                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
11192                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
11193                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
11194                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
11195                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
11196                 </fields>
11197                 <links>
11198                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
11199                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
11200                 </links>
11201         </class>
11202
11203         <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">
11204                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
11205                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11206                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11207                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11208                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11209                 </fields>
11210                 <links>
11211                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11212                 </links>
11213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11214                         <actions>
11215                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11216                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11217                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11218                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11219                         </actions>
11220                 </permacrud>
11221         </class>
11222
11223         <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">
11224                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
11225                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11226                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11227                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11228                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11229                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
11230                 </fields>
11231                 <links>
11232                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11233                 </links>
11234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11235                         <actions>
11236                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11237                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11238                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11239                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11240                         </actions>
11241                 </permacrud>
11242         </class>
11243
11244         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
11245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
11246                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11247                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11248                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11249                 </fields>
11250                 <links>
11251                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11252                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11253                 </links>
11254         </class>
11255
11256         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
11257                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
11258                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11259                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11260                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11261                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11262                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11263                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11264                 </fields>
11265                 <links>
11266                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11267                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
11268                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11269                 </links>
11270         </class>
11271
11272         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
11273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
11274                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11275                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11276                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
11277                 </fields>
11278                 <links>
11279                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11280                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
11281                 </links>
11282         </class>
11283
11284         <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">
11285                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
11286                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11287                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11288                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11289                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11290                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11291                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11292                 </fields>
11293                 <links>
11294                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11295                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
11296                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11297                 </links>
11298         </class>
11299
11300         <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">
11301                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
11302                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
11303                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11304                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
11305                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11306                 </fields>
11307                 <links>
11308                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11309                 </links>
11310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11311             <actions>
11312                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11313                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
11314                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11315                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11316             </actions>
11317                 </permacrud>
11318         </class>
11319
11320         <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">
11321                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
11322                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
11323                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
11324                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
11325                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
11326                 </fields>
11327                 <links>
11328                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
11329                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
11330                 </links>
11331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11332                         <actions>
11333                                 <create permission="ADMIN_CLAIM_POLICY">
11334                                         <context link="claim_policy" field="org_unit"/>
11335                 </create>
11336                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
11337                                         <context link="claim_policy" field="org_unit"/>
11338                 </retrieve>
11339                                 <update permission="ADMIN_CLAIM_POLICY">
11340                                         <context link="claim_policy" field="org_unit"/>
11341                 </update>
11342                                 <delete permission="ADMIN_CLAIM_POLICY">
11343                                         <context link="claim_policy" field="org_unit"/>
11344                 </delete>
11345                         </actions>
11346                 </permacrud>
11347         </class>
11348
11349     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
11350         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
11351             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11352             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
11353             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11354             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
11355             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
11356             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
11357             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
11358             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
11359             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
11360             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
11361             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
11362             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
11363             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
11364             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
11365             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11366             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
11367                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
11368                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
11369                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
11370         </fields>
11371         <links>
11372             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
11373             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11374         </links>
11375     </class>
11376
11377     <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">
11378         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
11379             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11380             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11381             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11382             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11383             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11384         </fields>
11385     </class>
11386
11387     <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">
11388         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11389             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11390             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11391             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11392             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11393             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11394             <field reporter:label="City" name="city" reporter:datatype="text"/>
11395             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11396             <field reporter:label="State" name="state" reporter:datatype="text"/>
11397             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11398             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11399             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11400         </fields>
11401     </class>
11402
11403     <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">
11404         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11405             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11406             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11407             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11408             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11409             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11410             <field reporter:label="City" name="city" reporter:datatype="text"/>
11411             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11412             <field reporter:label="State" name="state" reporter:datatype="text"/>
11413             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11414             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11415             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11416         </fields>
11417     </class>
11418
11419     <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">
11420         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
11421             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11422             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11423             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11424             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
11425             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
11426             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11427         </fields>
11428     </class>
11429
11430     <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">
11431         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
11432             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11433             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11434             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11435             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
11436             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
11437             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11438         </fields>
11439     </class>
11440
11441         <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">
11442                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
11443                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
11444                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11445                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
11446                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
11447                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
11448                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
11449                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
11450                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
11451                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11452                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11453                 </fields>
11454                 <links>
11455                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11456                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11457                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
11458                 </links>
11459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11460                         <actions>
11461                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11462                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11463                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11464                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11465                         </actions>
11466                 </permacrud>
11467         </class>
11468
11469         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
11470                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
11471                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
11472                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
11473                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
11474                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
11475                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
11476                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
11477                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
11478                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
11479                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
11480                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
11481                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
11482                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
11483                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
11484                 </fields>
11485                 <links>
11486                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
11487                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11488                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11489                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
11490                 </links>
11491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11492                         <actions>
11493                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11494                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11495                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11496                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11497                         </actions>
11498                 </permacrud>
11499         </class>
11500
11501         <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">
11502                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
11503                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
11504                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
11505                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
11506                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
11507                 </fields>
11508                 <links>
11509                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
11510                 </links>
11511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
11512                         <actions>
11513                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11514                     <context link="fieldset" field="owning_lib"/>
11515                 </create>
11516                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11517                     <context link="fieldset" field="owning_lib"/>
11518                 </retrieve>
11519                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11520                     <context link="fieldset" field="owning_lib"/>
11521                 </update>
11522                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11523                     <context link="fieldset" field="owning_lib"/>
11524                 </delete>
11525                         </actions>
11526                 </permacrud>
11527         </class>
11528
11529     <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">
11530         <fields>
11531             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11532             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11533             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11534         </fields>
11535                 <links>
11536                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11537                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11538                 </links>
11539     </class>
11540
11541     <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">
11542         <fields>
11543             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11544             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11545         </fields>
11546                 <links>
11547                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11548                 </links>
11549     </class>
11550
11551     <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">
11552         <fields>
11553             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11554             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11555             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11556         </fields>
11557                 <links>
11558                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11559                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11560                 </links>
11561     </class>
11562
11563     <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">
11564         <fields>
11565             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11566             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11567         </fields>
11568                 <links>
11569                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11570                 </links>
11571     </class>
11572
11573     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11574                 <oils_persist:source_definition><![CDATA[
11575
11576             SELECT  DISTINCT l.*
11577               FROM  action.unfulfilled_hold_loops l
11578                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11579               WHERE l.count = m.max
11580
11581                 ]]></oils_persist:source_definition>
11582         <fields>
11583             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11584             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11585             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11586         </fields>
11587                 <links>
11588                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11589                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11590                 </links>
11591     </class>
11592
11593         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11594                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11595                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11596                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11597                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11598                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11599                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11600                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11601                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11602                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11603                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11604                 </fields>
11605                 <links>
11606                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11607                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11608                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11609                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11610                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11611                 </links>
11612         </class>
11613
11614         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11615                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11616                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11617                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11618                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11619                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11620                 </fields>
11621                 <links>
11622                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11623                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11624                 </links>
11625         </class>
11626
11627         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11628                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11629                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11630                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11631                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11632                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11633                 </fields>
11634                 <links>
11635                 </links>
11636         </class>
11637
11638         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11639                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11640                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11641                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11642                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11643                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11644                 </fields>
11645                 <links>
11646                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11647                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11648                 </links>
11649         </class>
11650         
11651         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11652                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11653                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11654                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11655                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11656                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11657                 </fields>
11658                 <links>
11659                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11660                 </links>
11661         </class>
11662         
11663         <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">
11664                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11665                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11666                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11667                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11668                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11669                 </fields>
11670                 <links>
11671                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11672                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11673                 </links>
11674         </class>
11675
11676         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11677                 <fields oils_persist:primary="name">
11678                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11679                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11680                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11681                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11682                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11683                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11684                 </fields>
11685                 <links>
11686                 </links>
11687         </class>
11688
11689         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11690                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11691                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11692                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11693                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11694                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11695                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11696                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11697                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11698                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11699                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11700                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11701                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11702                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11703                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11704                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11705                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11706                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11707                 </fields>
11708                 <links>
11709                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11710                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11711                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11712                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11713                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11714                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11715                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11716                 </links>
11717         </class>
11718
11719         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11720                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11721                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11722                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11723                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11724                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11725                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11726                 </fields>
11727                 <links>
11728                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11729                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11730                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11731                 </links>
11732         </class>
11733
11734         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11735                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11736                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11737                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11738                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11739                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11740                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11741                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11742                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11743                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11744                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11745                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11746                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11747                 </fields>
11748                 <links>
11749                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11750                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11751                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11752                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11753                 </links>
11754         </class>
11755
11756         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11757                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11758                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11759                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11760                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11761                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11762                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11763                 </fields>
11764                 <links>
11765                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11766                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11767                 </links>
11768         </class>
11769
11770         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11771                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11772                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11773                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11774                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11775                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11776                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11777                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11778                 </fields>
11779                 <links>
11780                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11781                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11782                 </links>
11783         </class>
11784
11785         <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">
11786                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11787                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11788                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11789                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11790                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11791                 </fields>
11792                 <links>
11793                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11794                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11795                 </links>
11796         </class>
11797
11798         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11799                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11800                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11801                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11802                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11803                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11804                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11805                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11806                 </fields>
11807                 <links>
11808                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11809                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11810                 </links>
11811         </class>
11812
11813         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11814                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11815                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11816                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11817                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11818                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11819                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11820                 </fields>
11821                 <links>
11822                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11823                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11824                 </links>
11825         </class>
11826
11827         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11828                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11829                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11830                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11831                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11832                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11833                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11834                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11835                 </fields>
11836                 <links>
11837                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11838                 </links>
11839         </class>
11840
11841         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11842                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11843                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11844                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11845                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11846                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11847                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11848                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11849                 </fields>
11850                 <links>
11851                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11852                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11853                 </links>
11854         </class>
11855
11856         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11857                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11858                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11859                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11860                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11861                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11862                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11863                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11864                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11865                 </fields>
11866                 <links>
11867                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11868                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11869                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11870                 </links>
11871         </class>
11872
11873         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11874                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11875                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11876                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11877                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11878                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11879                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11880                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11881                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11882                 </fields>
11883                 <links>
11884                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11885                 </links>
11886         </class>
11887
11888         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11889                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11890                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11891                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11892                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11893                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11894                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11895                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11896                 </fields>
11897                 <links>
11898                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11899                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11900                 </links>
11901         </class>
11902
11903         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11904                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11905                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11906                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11907                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11908                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11909                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11910                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11911                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11912                 </fields>
11913                 <links>
11914                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11915                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11916                 </links>
11917         </class>
11918
11919         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11920                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11921                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11922                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11923                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11924                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11925                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11926                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11927                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11928                 </fields>
11929                 <links>
11930                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11931                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11932                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11933                 </links>
11934         </class>
11935
11936         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11937                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11938                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11939                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11940                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11941                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11942                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11943                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11944                 </fields>
11945                 <links>
11946                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11947                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11948                 </links>
11949         </class>
11950
11951         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11952                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11953                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11954                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11955                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11956                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11957                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11958                 </fields>
11959                 <links>
11960                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11961                 </links>
11962         </class>
11963
11964         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11965                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11966                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11967                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11968                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11969                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11970                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11971                 </fields>
11972                 <links>
11973                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11974                 </links>
11975         </class>
11976
11977         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11978                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11979                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11980                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11981                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11982                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11983                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11984                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11985                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11986                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11987                 </fields>
11988                 <links>
11989                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11990                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11991                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11992                 </links>
11993         </class>
11994
11995         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11996                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11997                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11998                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11999                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
12000                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
12001                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
12002                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
12003                 </fields>
12004                 <links>
12005                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
12006                 </links>
12007         </class>
12008
12009         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
12010                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
12011                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
12012                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
12013                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
12014                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
12015                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
12016                 </fields>
12017                 <links>
12018                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
12019                 </links>
12020         </class>
12021
12022         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
12023                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
12024                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
12025                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
12026                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
12027                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
12028                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
12029                 </fields>
12030                 <links>
12031                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
12032                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
12033                 </links>
12034         </class>
12035
12036         <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">
12037                 <fields oils_persist:primary="id">
12038                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
12039                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
12040                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
12041                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
12042                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
12043                 </fields>
12044                 <links>
12045                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
12046                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
12047                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
12048                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
12049                 </links>
12050         </class>
12051
12052         <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">
12053                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
12054                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12055                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
12056                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12057                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
12058                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
12059                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12060                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
12061                 </fields>
12062                 <links/>
12063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12064                         <actions>
12065                                 <retrieve/>
12066                         </actions>
12067                 </permacrud>
12068         </class>
12069
12070         <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">
12071                 <fields oils_persist:primary="ptype_key">
12072                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
12073                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12074                 </fields>
12075                 <links/>
12076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12077                         <actions>
12078                                 <retrieve/>
12079                         </actions>
12080                 </permacrud>
12081         </class>
12082
12083         <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">
12084                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
12085                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12086                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
12087                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12088                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
12089                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12090                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12091                 </fields>
12092                 <links>
12093                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
12094                 </links>
12095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12096                         <actions>
12097                                 <retrieve/>
12098                         </actions>
12099                 </permacrud>
12100         </class>
12101
12102         <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">
12103                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
12104                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12105                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12106                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
12107                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12108                 </fields>
12109                 <links>
12110                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
12111                 </links>
12112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12113                         <actions>
12114                                 <retrieve/>
12115                         </actions>
12116                 </permacrud>
12117         </class>
12118
12119     <class
12120         id="uvs"
12121         controller="open-ils.cstore open-ils.pcrud"
12122         oils_obj:fieldmapper="url_verify::session"
12123         oils_persist:tablename="url_verify.session"
12124         reporter:label="URL Verification Session"
12125     >
12126         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
12127             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
12128             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
12129                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
12130             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
12131             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
12132             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12133             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
12134             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
12135             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
12136         </fields>
12137
12138         <links>
12139             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12140             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12141             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
12142             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
12143             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
12144         </links>
12145
12146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12147             <actions>
12148                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
12149             </actions>
12150         </permacrud>
12151
12152     </class>
12153
12154     <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">
12155         <oils_persist:source_definition><![CDATA[
12156             SELECT
12157                 cbrebi.id AS id,  -- so we can have a pkey in our view
12158                 uvs.id AS session,
12159                 uvs.owning_lib,
12160                 cbrebi.target_biblio_record_entry
12161             FROM url_verify.session uvs
12162             JOIN container.biblio_record_entry_bucket cbreb
12163                 ON (uvs.container = cbreb.id)
12164             JOIN container.biblio_record_entry_bucket_item cbrebi
12165                 ON (cbrebi.bucket = cbreb.id)
12166         ]]></oils_persist:source_definition>
12167         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
12168             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
12169             <field reporter:label="Session" name="session" reporter:datatype="link" />
12170             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
12171             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
12172         </fields>
12173         <links>
12174             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
12175             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
12176             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
12177         </links>
12178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12179             <actions>
12180                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
12181             </actions>
12182         </permacrud>
12183     </class>
12184
12185     <class
12186         id="uvus"
12187         controller="open-ils.cstore open-ils.pcrud"
12188         oils_obj:fieldmapper="url_verify::url_selector"
12189         oils_persist:tablename="url_verify.url_selector"
12190         reporter:label="URL Verification URL Selector"
12191     >
12192         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
12193             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
12194             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
12195                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12196             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
12197         </fields>
12198
12199         <links>
12200             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12201             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
12202         </links>
12203
12204         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12205             <actions>
12206                 <create permission="URL_VERIFY">
12207                     <context link="session" field="owning_lib"/>
12208                 </create>
12209                 <retrieve permission="URL_VERIFY">
12210                     <context link="session" field="owning_lib"/>
12211                 </retrieve>
12212                 <update permission="URL_VERIFY">
12213                     <context link="session" field="owning_lib"/>
12214                 </update>
12215                 <delete permission="URL_VERIFY">
12216                     <context link="session" field="owning_lib"/>
12217                 </delete>
12218             </actions>
12219         </permacrud>
12220
12221     </class>
12222
12223     <class
12224         id="uvu"
12225         controller="open-ils.cstore open-ils.pcrud"
12226         oils_obj:fieldmapper="url_verify::url"
12227         oils_persist:tablename="url_verify.url"
12228         reporter:label="URL Verification URL"
12229     >
12230         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
12231             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
12232                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
12233                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
12234                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12235                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
12236             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12237             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12238             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
12239             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
12240             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
12241             <field reporter:label="Host" name="host" reporter:datatype="text"/>
12242             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
12243             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
12244             <field reporter:label="Path" name="path" reporter:datatype="text"/>
12245             <field reporter:label="Page" name="page" reporter:datatype="text"/>
12246             <field reporter:label="Query" name="query" reporter:datatype="text"/>
12247             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
12248             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
12249         </fields>
12250
12251         <links>
12252             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
12253             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
12254             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12255             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
12256             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
12257         </links>
12258
12259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12260             <actions>
12261                 <create permission="URL_VERIFY">
12262                     <context link="session" field="owning_lib"/>
12263                 </create>
12264                 <retrieve permission="URL_VERIFY">
12265                     <context link="session" field="owning_lib"/>
12266                 </retrieve>
12267                 <update permission="URL_VERIFY">
12268                     <context link="session" field="owning_lib"/>
12269                 </update>
12270                 <delete permission="URL_VERIFY">
12271                     <context link="session" field="owning_lib"/>
12272                 </delete>
12273             </actions>
12274         </permacrud>
12275
12276     </class>
12277
12278     <class
12279         id="uvva"
12280         controller="open-ils.cstore open-ils.pcrud"
12281         oils_obj:fieldmapper="url_verify::verification_attempt"
12282         oils_persist:tablename="url_verify.verification_attempt"
12283         reporter:label="URL Verification Attempt"
12284     >
12285         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
12286             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
12287                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
12288                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
12289             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
12290             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
12291         </fields>
12292
12293         <links>
12294             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12295             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12296         </links>
12297
12298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12299             <actions>
12300                 <create permission="URL_VERIFY">
12301                     <context link="session" field="owning_lib"/>
12302                 </create>
12303                 <retrieve permission="URL_VERIFY">
12304                     <context link="session" field="owning_lib"/>
12305                 </retrieve>
12306                 <update permission="URL_VERIFY">
12307                     <context link="session" field="owning_lib"/>
12308                 </update>
12309                 <delete permission="URL_VERIFY">
12310                     <context link="session" field="owning_lib"/>
12311                 </delete>
12312             </actions>
12313         </permacrud>
12314
12315     </class>
12316
12317     <class
12318         id="uvuv"
12319         controller="open-ils.cstore open-ils.pcrud"
12320         oils_obj:fieldmapper="url_verify::url_verification"
12321         oils_persist:tablename="url_verify.url_verification"
12322         reporter:label="URL Verification"
12323     >
12324         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
12325             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
12326                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
12327                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
12328             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
12329             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
12330             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
12331             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
12332                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
12333         </fields>
12334
12335         <links>
12336             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
12337             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
12338             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
12339         </links>
12340
12341         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12342             <actions>
12343                 <create permission="URL_VERIFY">
12344                     <context link="attempt" jump="session" field="owning_lib"/>
12345                 </create>
12346                 <retrieve permission="URL_VERIFY">
12347                     <context link="attempt" jump="session" field="owning_lib"/>
12348                 </retrieve>
12349                 <update permission="URL_VERIFY">
12350                     <context link="attempt" jump="session" field="owning_lib"/>
12351                 </update>
12352                 <delete permission="URL_VERIFY">
12353                     <context link="attempt" jump="session" field="owning_lib"/>
12354                 </delete>
12355             </actions>
12356         </permacrud>
12357
12358     </class>
12359
12360         <class
12361                 id="cfdi"
12362                 controller="open-ils.cstore open-ils.pcrud"
12363                 oils_obj:fieldmapper="config::filter_dialog_interface"
12364                 oils_persist:tablename="config.filter_dialog_interface"
12365                 reporter:label="FilterDialog Interface">
12366                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
12367                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
12368                         <field reporter:label="Description" name="description" reporter:datatype="text" />
12369                 </fields>
12370                 <links>
12371                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
12372                 </links>
12373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12374                         <actions>
12375                                 <retrieve />
12376                         </actions>
12377                 </permacrud>
12378         </class>
12379
12380         <class
12381                 id="cfdfs"
12382                 controller="open-ils.cstore open-ils.pcrud"
12383                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
12384                 oils_persist:tablename="config.filter_dialog_filter_set"
12385                 reporter:label="FilterDialog Filter Set">
12386                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
12387                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12388                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12389                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12390                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12391                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
12392                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12393                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
12394                 </fields>
12395                 <links>
12396                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12397                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12398                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
12399                 </links>
12400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12401                         <actions>
12402                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12403                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12404                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12405                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12406                         </actions>
12407                 </permacrud>
12408
12409         </class>
12410
12411         <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">
12412                 <fields oils_persist:primary="code">
12413                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
12414                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
12415                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
12416                 </fields>
12417                 <links/>
12418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12419                         <actions>
12420                                 <retrieve/>
12421                         </actions>
12422                 </permacrud>
12423         </class>
12424
12425         <class id="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">
12426                 <oils_persist:source_definition><![CDATA[
12427
12428             SELECT  b.id,
12429                     MAX(dcp.edit_date) AS last_delete_date
12430              FROM   biblio.record_entry b
12431                     JOIN asset.call_number cn ON (cn.record = b.id)
12432                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
12433              WHERE  NOT b.deleted
12434              GROUP BY b.id
12435              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
12436
12437                 ]]></oils_persist:source_definition>
12438                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12439                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12440                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
12441                 </fields>
12442                 <links>
12443                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12444                 </links>
12445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12446                         <actions>
12447                                 <retrieve/>
12448                         </actions>
12449                 </permacrud>
12450         </class>
12451
12452         <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">
12453                 <fields oils_persist:primary="id">
12454                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12455                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12456                 </fields>
12457                 <links/>
12458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12459                         <actions>
12460                                 <retrieve/>
12461                         </actions>
12462                 </permacrud>
12463         </class>
12464
12465         <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">
12466                 <fields oils_persist:primary="id">
12467                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12468                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12469                 </fields>
12470                 <links/>
12471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12472                         <actions>
12473                                 <retrieve/>
12474                         </actions>
12475                 </permacrud>
12476         </class>
12477
12478
12479         <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">
12480                 <oils_persist:source_definition><![CDATA[
12481                 SELECT
12482                     x.id,
12483                     COALESCE( y.copy_count, 0 ) AS copy_count,
12484                     x.hold_count AS hold_count,
12485                     CASE WHEN y.copy_count = 0 THEN 'Infinity'::FLOAT ELSE x.hold_count::FLOAT/y.copy_count::FLOAT END AS hold_copy_ratio
12486                 FROM
12487                     (SELECT bib_record as id, count(DISTINCT ahr.id) AS hold_count
12488                         FROM
12489                             action.hold_request ahr
12490                             JOIN reporter.hold_request_record rhrr USING (id)
12491                         WHERE
12492                             ahr.cancel_time IS NULL
12493                             AND ahr.fulfillment_time IS NULL
12494                         GROUP BY bib_record
12495                     )x
12496                     JOIN
12497                     (SELECT bib_record as id, COALESCE(count(DISTINCT target_copy),0) as copy_count
12498                         FROM
12499                             action.hold_request ahr
12500                             JOIN reporter.hold_request_record rhrr USING (id)
12501                             LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12502                         WHERE
12503                             ahr.cancel_time IS NULL
12504                             AND ahr.fulfillment_time IS NULL
12505                             AND ahr.capture_time IS NULL
12506                             AND ahr.frozen IS FALSE
12507                             -- Comment out the next line to count copies included from other bibs by metarecord holds
12508                             AND ahr.hold_type != 'M'
12509                            GROUP BY bib_record
12510                     )y
12511                     USING (id)
12512                 ]]></oils_persist:source_definition>
12513                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12514                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12515                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
12516                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
12517                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
12518                 </fields>
12519                 <links>
12520                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12521                 </links>
12522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12523                         <actions>
12524                                 <retrieve/>
12525                         </actions>
12526                 </permacrud>
12527         </class>
12528
12529         <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">
12530                 <oils_persist:source_definition><![CDATA[
12531             SELECT *,
12532                 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,
12533                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12534             FROM
12535                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library
12536                     FROM
12537                         action.hold_request ahr
12538                         JOIN reporter.hold_request_record rhrr USING (id)
12539                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12540                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12541                     WHERE
12542                         ahr.cancel_time IS NULL
12543                         AND ahr.fulfillment_time IS NULL
12544                     GROUP BY bib_record, pickup_lib
12545                 )x
12546                 JOIN
12547                 (SELECT bib_record as id, pickup_lib, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
12548                     FROM
12549                         action.hold_request ahr
12550                         JOIN reporter.hold_request_record rhrr USING (id)
12551                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12552                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12553                     WHERE
12554                         ahr.cancel_time IS NULL
12555                         AND ahr.fulfillment_time IS NULL
12556                         AND ahr.capture_time IS NULL
12557                         AND ahr.frozen IS FALSE
12558                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12559                         AND ahr.hold_type != 'M'
12560                     GROUP BY bib_record, pickup_lib
12561                 )y
12562                 USING(id,pickup_lib)
12563                 JOIN
12564                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere
12565                     FROM
12566                         action.hold_request ahr
12567                         JOIN reporter.hold_request_record rhrr USING (id)
12568                     WHERE
12569                         ahr.cancel_time IS NULL
12570                         AND ahr.fulfillment_time IS NULL
12571                     GROUP BY bib_record
12572                 )z
12573                 USING (id)
12574                 JOIN
12575                 (SELECT bib_record as id, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12576                     FROM
12577                         action.hold_request ahr
12578                         JOIN reporter.hold_request_record rhrr USING (id)
12579                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12580                     WHERE
12581                         ahr.cancel_time IS NULL
12582                         AND ahr.fulfillment_time IS NULL
12583                         AND ahr.capture_time IS NULL
12584                         AND ahr.frozen IS FALSE
12585                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12586                         AND ahr.hold_type != 'M'
12587                         GROUP BY bib_record
12588                 )u
12589                 USING (id)
12590                 ]]></oils_persist:source_definition>
12591                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12592                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12593                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12594                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12595                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12596                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12597                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12598                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12599                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12600                 </fields>
12601                 <links>
12602                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12603                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12604                 </links>
12605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12606                         <actions>
12607                                 <retrieve/>
12608                         </actions>
12609                 </permacrud>
12610         </class>
12611
12612         <class id="rhcrpbah" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_home" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Home Library">
12613                 <oils_persist:source_definition><![CDATA[
12614             SELECT *,
12615                 CASE WHEN copy_count_at_home_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_home_library::FLOAT/copy_count_at_home_library END AS home_library_ratio,
12616                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12617             FROM
12618                 (SELECT bib_record as id, home_ou, count(DISTINCT ahr.id) AS holds_at_home_library
12619                     FROM
12620                         action.hold_request ahr
12621                         JOIN actor.usr au ON (ahr.usr = au.id)
12622                         JOIN reporter.hold_request_record rhrr ON (rhrr.id = ahr.id)
12623                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12624                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND au.home_ou = ac.circ_lib)
12625                     WHERE
12626                         ahr.cancel_time IS NULL
12627                         AND ahr.fulfillment_time IS NULL
12628                     GROUP BY bib_record, home_ou
12629                 )x
12630                 JOIN
12631                 (SELECT bib_record as id, home_ou, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_home_library
12632                     FROM
12633                         action.hold_request ahr
12634                         JOIN actor.usr au ON (ahr.usr = au.id)
12635                         JOIN reporter.hold_request_record rhrr ON (rhrr.id = ahr.id)
12636                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12637                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND au.home_ou = ac.circ_lib)
12638                     WHERE
12639                         ahr.cancel_time IS NULL
12640                         AND ahr.fulfillment_time IS NULL
12641                         AND ahr.capture_time IS NULL
12642                         AND ahr.frozen IS FALSE
12643                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12644                         AND ahr.hold_type != 'M'
12645                     GROUP BY bib_record, home_ou
12646                 )y
12647                 USING (id,home_ou)
12648                 JOIN
12649                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere
12650                     FROM
12651                         action.hold_request ahr
12652                         JOIN reporter.hold_request_record rhrr USING (id)
12653                     WHERE
12654                         ahr.cancel_time IS NULL
12655                         AND ahr.fulfillment_time IS NULL
12656                     GROUP BY bib_record
12657                 )z
12658                 USING (id)
12659                 JOIN
12660                 (SELECT bib_record as id, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12661                     FROM
12662                         action.hold_request ahr
12663                         JOIN reporter.hold_request_record rhrr USING (id)
12664                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12665                     WHERE
12666                         ahr.cancel_time IS NULL
12667                         AND ahr.fulfillment_time IS NULL
12668                         AND ahr.capture_time IS NULL
12669                         AND ahr.frozen IS FALSE
12670                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12671                         AND ahr.hold_type != 'M'
12672                     GROUP BY bib_record
12673                 )u
12674                 USING (id)
12675         ]]></oils_persist:source_definition>
12676         <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12677                 <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12678                 <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12679                 <field reporter:label="Active Holds at Home Library" name="holds_at_home_library" reporter:datatype="int"/>
12680                 <field reporter:label="Holdable Copy Count at Home Library" name="copy_count_at_home_library" reporter:datatype="int"/>
12681                 <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12682                 <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12683                 <field reporter:label="Hold/Copy Ratio at Home Library" name="home_library_ratio" reporter:datatype="float"/>
12684                 <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12685         </fields>
12686         <links>
12687                 <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12688                 <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12689         </links>
12690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12691                 <actions>
12692                         <retrieve/>
12693                 </actions>
12694         </permacrud>
12695 </class>
12696
12697         <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) ">
12698                 <oils_persist:source_definition><![CDATA[
12699                 WITH counts_at_ou AS (
12700                 SELECT a.id, a.pickup_lib_or_desc, a.holds_at_or_below, b.copy_count_at_or_below
12701                 FROM
12702                     (SELECT rhrr.bib_record AS id,
12703                             aou.id AS pickup_lib_or_desc,
12704                             COUNT(DISTINCT ahr.id) AS holds_at_or_below
12705                        FROM actor.org_unit aou
12706                             JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12707                             action.hold_request ahr
12708                             JOIN reporter.hold_request_record rhrr USING (id)
12709                             LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12710                             LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12711                       WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12712                             AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12713                             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
12714                       GROUP BY 1, 2
12715                 ) a
12716                 JOIN
12717                     (SELECT rhrr.bib_record AS id,
12718                             aou.id AS pickup_lib_or_desc,
12719                             COALESCE(COUNT(DISTINCT ahcm.target_copy),0) AS copy_count_at_or_below
12720                        FROM actor.org_unit aou
12721                             JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12722                             action.hold_request ahr
12723                             JOIN reporter.hold_request_record rhrr USING (id)
12724                             LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12725                             LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12726                       WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL AND ahr.capture_time IS NULL AND NOT ahr.frozen
12727                             -- Comment out the next line to count copies included from other bibs by metarecord holds
12728                             AND ahr.hold_type != 'M'
12729                             AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12730                             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
12731                       GROUP BY 1, 2
12732                 ) b
12733                 USING (id,pickup_lib_or_desc)
12734             )
12735             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12736                    y.holds_everywhere, z.copy_count_everywhere,
12737                 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,
12738                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/z.copy_count_everywhere END AS everywhere_ratio
12739             FROM counts_at_ou x
12740                 JOIN
12741                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere
12742                     FROM
12743                         action.hold_request ahr
12744                         JOIN reporter.hold_request_record rhrr USING (id)
12745                     WHERE
12746                         ahr.cancel_time IS NULL
12747                         AND ahr.fulfillment_time IS NULL
12748                     GROUP BY bib_record
12749                 )y
12750                 USING (id)
12751                 JOIN
12752                 (SELECT bib_record as id, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12753                     FROM
12754                         action.hold_request ahr
12755                         JOIN reporter.hold_request_record rhrr USING (id)
12756                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12757                     WHERE
12758                         ahr.cancel_time IS NULL
12759                         AND ahr.fulfillment_time IS NULL
12760                         AND ahr.capture_time IS NULL
12761                         AND ahr.frozen IS FALSE
12762                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12763                         AND ahr.hold_type != 'M'
12764                         GROUP BY bib_record
12765                 )z
12766                 USING (id)
12767                 ]]></oils_persist:source_definition>
12768                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12769                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12770                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12771                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12772                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12773                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12774                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12775                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12776                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12777                 </fields>
12778                 <links>
12779                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12780                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12781                 </links>
12782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12783                         <actions>
12784                                 <retrieve/>
12785                         </actions>
12786                 </permacrud>
12787         </class>
12788
12789         <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">
12790                 <oils_persist:source_definition><![CDATA[
12791             SELECT
12792                 ac.id,
12793                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12794                 MAX(actac.xact_start) AS last_circ
12795             FROM asset.copy ac
12796                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12797             GROUP BY ac.id
12798
12799             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12800             --SELECT
12801             --    ac.id,
12802             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12803             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12804             --FROM asset.copy ac
12805             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12806             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12807             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12808                 ]]></oils_persist:source_definition>
12809                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12810                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12811                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12812                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12813                 </fields>
12814                 <links>
12815                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12816                 </links>
12817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12818                         <actions>
12819                                 <retrieve/>
12820                         </actions>
12821                 </permacrud>
12822         </class>
12823
12824         <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">
12825                 <fields oils_persist:primary="id">
12826                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12827                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12828                 </fields>
12829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12830                         <actions>
12831                                 <retrieve/>
12832                         </actions>
12833                 </permacrud>
12834         </class>
12835
12836         <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">
12837                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12838                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12839                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12840                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12841                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12842                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12843                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12844                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12845                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12846                 </fields>
12847                 <links>
12848                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12849                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12850                 </links>
12851                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12852                         <actions>
12853                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12854                                 <retrieve/>
12855                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12856                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12857                         </actions>
12858                 </permacrud>
12859         </class>
12860
12861         <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">
12862                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12863                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12864                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12865                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12866                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12867                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12868                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12869                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12870                 </fields>
12871                 <links>
12872                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12873                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12874                 </links>
12875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12876                         <actions>
12877                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12878                                 <retrieve/>
12879                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12880                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12881                         </actions>
12882                 </permacrud>
12883         </class>
12884
12885
12886         <!-- ********************************************************************************************************************* -->
12887         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12888         <!-- ********************************************************************************************************************* -->
12889         <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">
12890                 <fields oils_persist:primary="id">
12891                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12892                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12893                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12894                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12895                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12896                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12897                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12898                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12899                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12900                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12901                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12902                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12903                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12904                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12905                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12906                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12907                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12908                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12909                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12910                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12911                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12912                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12913                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12914                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12915                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12916                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12917                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12918                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12919                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12920                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12921                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12922                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12923                 </fields>
12924                 <links>
12925                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12926                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12927                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12928                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12929                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12930                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12931                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12932                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12933                 </links>
12934         </class>
12935
12936         <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">
12937                 <fields oils_persist:primary="id">
12938                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12939                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12940                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12941                 </fields>
12942                 <links>
12943                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12944                 </links>
12945         </class>
12946
12947         <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">
12948                 <fields oils_persist:primary="id">
12949                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12950                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12951                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12952                 </fields>
12953                 <links>
12954                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12955                 </links>
12956         </class>
12957
12958         <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">
12959                 <fields oils_persist:primary="id">
12960                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12961
12962                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12963                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12964                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12965
12966                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12967                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12968                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12969
12970                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12971                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12972
12973                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12974                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12975                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12976
12977                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12978                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12979
12980                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12981                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12982                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12983
12984                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12985                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12986                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12987
12988                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12989                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12990                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12991                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12992
12993                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12994                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12995
12996                 </fields>
12997                 <links>
12998                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12999                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
13000                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
13001                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
13002                 </links>
13003         </class>
13004
13005         <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">
13006                 <oils_persist:source_definition><![CDATA[
13007
13008             SELECT
13009                 po.ordering_agency AS ordering_agency,
13010                 po.id AS purchase_order,
13011                 li.id AS lineitem,
13012                 lid.id AS lineitem_detail,
13013                 cpa.id AS claim_policy_action
13014             FROM
13015                 acq.lineitem_detail lid
13016                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
13017                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
13018                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
13019                 JOIN acq.claim_policy_action cpa ON (
13020                     cpa.claim_policy = cp.id
13021
13022                     -- we only care about claim policy actions whose claim
13023                     -- interval we'd reached or exceeded
13024                     AND (NOW() - cpa.action_interval) > po.order_date
13025
13026                     -- filter out all claim policy actions where claim events
13027                     -- have occurred on or after the action's action_interval
13028                     AND NOT EXISTS (
13029                         SELECT 1
13030                         FROM
13031                             acq.claim_event evt
13032                             JOIN acq.claim claim ON (
13033                                 claim.id = evt.claim
13034                                 AND claim.lineitem_detail = lid.id
13035                             )
13036                         WHERE
13037                             evt.event_date >= (po.order_date + cpa.action_interval)
13038                     )
13039                 )
13040             WHERE
13041                 lid.cancel_reason IS NULL
13042                 AND li.cancel_reason IS NULL -- belt/suspenders
13043                 AND po.cancel_reason IS NULL -- belt/suspenders
13044                 AND lid.recv_time IS NULL
13045                 AND po.state = 'on-order'
13046             ORDER BY 1, 2, 3, 4, 5
13047
13048                 ]]></oils_persist:source_definition>
13049                 <fields>
13050                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
13051                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
13052                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
13053                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
13054                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
13055                 </fields>
13056                 <links>
13057                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
13058                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
13059                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
13060                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
13061                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
13062                 </links>
13063         </class>
13064         <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">
13065                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
13066                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
13067                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
13068                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
13069                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
13070                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
13071                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
13072                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
13073                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
13074                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
13075                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
13076                 </fields>
13077                 <links>
13078                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
13079                 </links>
13080     </class>
13081         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
13082                 <oils_persist:source_definition><![CDATA[
13083             SELECT * FROM acq.lineitem_summary 
13084                                 WHERE item_count > (invoice_count + cancel_count)
13085         ]]></oils_persist:source_definition>
13086                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
13087                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
13088                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
13089                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
13090                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
13091                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
13092                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
13093                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
13094                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
13095                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
13096                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
13097                 </fields>
13098                 <links>
13099                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
13100                 </links>
13101     </class>
13102         <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">
13103                 <oils_persist:source_definition><![CDATA[
13104
13105                         SELECT  t.*
13106                           FROM  action.transit_copy t
13107                                 JOIN actor.org_unit AS s ON (t.source = s.id)
13108                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
13109                           WHERE s.parent_ou <> d.parent_ou
13110
13111                 ]]></oils_persist:source_definition>
13112                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
13113                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
13114                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
13115                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
13116                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
13117                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
13118                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
13119                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
13120                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
13121                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
13122                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
13123                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
13124                 </fields>
13125                 <links>
13126                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
13127                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
13128                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
13129                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
13130                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
13131                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
13132                 </links>
13133         </class>
13134
13135     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
13136                 <oils_persist:source_definition><![CDATA[
13137
13138         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
13139                 SELECT
13140                         cp.id as copy,
13141                         COUNT(circ.id),
13142                         EXTRACT(YEAR FROM circ.xact_start) AS year,
13143                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
13144                 FROM
13145                         asset.copy cp
13146                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
13147                 GROUP BY 1, 3, 4
13148                 UNION ALL
13149                 SELECT
13150                         cp.id as copy,
13151                         COUNT(circ.id),
13152                         EXTRACT(YEAR FROM circ.xact_start) AS year,
13153                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
13154                 FROM
13155                         asset.copy cp
13156                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
13157                 GROUP BY 1, 3, 4
13158                 UNION ALL
13159                 SELECT
13160                         id as copy,
13161                         circ_count,
13162                         -1 AS year,
13163                         false as is_renewal
13164                 FROM
13165                         extend_reporter.legacy_circ_count
13166         )x GROUP BY 1, 3, 4
13167
13168                 ]]></oils_persist:source_definition>
13169         <fields>
13170             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
13171             <field reporter:label="Count" name="count" reporter:datatype="int"/>
13172             <field reporter:label="Year" name="year" reporter:datatype="int"/>
13173             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
13174         </fields>
13175                 <links>
13176                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13177                 </links>
13178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13179                         <actions>
13180                                 <retrieve/>
13181                         </actions>
13182                 </permacrud>
13183     </class>
13184
13185         <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">
13186                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
13187                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
13188                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
13189                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
13190                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
13191                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
13192                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
13193                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
13194                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
13195                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
13196                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
13197                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
13198                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
13199                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
13200                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
13201                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
13202                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
13203                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
13204                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
13205                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
13206                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
13207                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
13208                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
13209                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
13210                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
13211                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
13212                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
13213                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
13214                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
13215                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
13216                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
13217                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
13218                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
13219                 </fields>
13220                 <links>
13221                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
13222                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
13223                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
13224                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
13225                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
13226                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
13227                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13228                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
13229                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
13230                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
13231                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
13232                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
13233                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
13234                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
13235                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
13236                 </links>
13237         </class>
13238
13239     <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">
13240         <fields oils_persist:primary="id">
13241             <field reporter:label="Title" name="title" reporter:datatype="text"/>
13242             <field reporter:label="Author" name="author" reporter:datatype="text"/>
13243             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
13244             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13245             <field reporter:label="Price" name="price" reporter:datatype="money"/>
13246             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
13247             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
13248             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
13249             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
13250             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
13251             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
13252             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
13253             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
13254             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
13255             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
13256             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
13257             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
13258             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
13259             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
13260             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
13261             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
13262             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
13263             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
13264             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
13265             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
13266             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
13267             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
13268             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
13269             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
13270             <field reporter:label="Status" name="status" reporter:datatype="link"/>
13271             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
13272             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
13273             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
13274             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
13275         </fields>
13276         <links>
13277             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13278             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
13279             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13280             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13281             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
13282             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
13283             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
13284             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
13285         </links>
13286     </class>
13287
13288     <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">
13289         <fields oils_persist:primary="id">
13290             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13291             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13292             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13293             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13294         </fields>
13295         <links>
13296             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13297             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13298         </links>
13299     </class>
13300
13301     <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">
13302         <fields oils_persist:primary="owning_lib">
13303             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13304             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13305             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13306         </fields>
13307         <links>
13308             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13309         </links>
13310     </class>
13311
13312     <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">
13313         <fields oils_persist:primary="id">
13314             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13315             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13316             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13317             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13318             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13319         </fields>
13320         <links>
13321             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13322             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13323             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13324         </links>
13325     </class>
13326
13327     <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">
13328         <fields oils_persist:primary="circ_lib">
13329             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13330             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13331             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13332             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13333         </fields>
13334         <links>
13335             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13336             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13337         </links>
13338     </class>
13339
13340     <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">
13341         <fields oils_persist:primary="id">
13342             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13343             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13344             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13345             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13346             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13347         </fields>
13348         <links>
13349             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13350             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13351             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13352         </links>
13353     </class>
13354
13355     <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">
13356         <fields oils_persist:primary="home_ou">
13357             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13358             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13359             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13360             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13361         </fields>
13362         <links>
13363             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13364             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13365         </links>
13366     </class>
13367         <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">
13368                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
13369                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
13370                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13371                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13372                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
13373                 </fields>
13374                 <links>
13375                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13376                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
13377                 </links>
13378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13379                         <actions>
13380                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13381                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
13382                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13383                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13384                         </actions>
13385                 </permacrud>
13386         </class>
13387         <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">
13388                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
13389                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
13390                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
13391                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
13392                 </fields>
13393                 <links>
13394                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
13395                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
13396                         </links>
13397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13398                 <actions>
13399                                 <create permission="ADMIN_ACQ_FUND_TAG">
13400                                         <context link="tag" field="owner"/>
13401                                 </create>
13402                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
13403                                         <context link="tag" field="owner"/>
13404                                 </retrieve>
13405                                 <update permission="ADMIN_ACQ_FUND_TAG">
13406                                         <context link="tag" field="owner"/>
13407                                 </update>
13408                                 <delete permission="ADMIN_ACQ_FUND_TAG">
13409                                         <context link="tag" field="owner"/>
13410                                 </delete>
13411                         </actions>
13412                 </permacrud>
13413         </class>
13414         <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">
13415                 <oils_persist:source_definition><![CDATA[
13416                 SELECT
13417                         poi.purchase_order AS purchase_order,
13418                         ii.invoice AS invoice,
13419                         NULL AS lineitem,
13420                         poi.id AS po_item,
13421                         NULL AS picklist
13422                 FROM
13423                         acq.po_item poi
13424                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
13425                 UNION SELECT
13426                         jub.purchase_order AS purchase_order,
13427                         ie.invoice AS invoice,
13428                         jub.id AS lineitem,
13429                         NULL AS po_item,
13430                         jub.picklist AS picklist
13431                 FROM
13432                         acq.lineitem jub
13433                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
13434                 UNION SELECT
13435                         ii.purchase_order AS purchase_order,
13436                         ii.invoice AS invoice,
13437                         NULL AS lineitem,
13438                         NULL AS po_item,
13439                         NULL AS picklist
13440                 FROM
13441                         acq.invoice_item ii
13442                 WHERE ii.po_item IS NULL
13443                 UNION SELECT
13444                         ie.purchase_order AS purchase_order,
13445                         ie.invoice AS invoice,
13446                         NULL AS lineitem,
13447                         NULL AS po_item,
13448                         NULL AS picklist
13449                 FROM
13450                         acq.invoice_entry ie
13451                 WHERE ie.lineitem IS NULL
13452                 UNION SELECT
13453                         NULL AS purchase_order,
13454                         NULL AS invoice,
13455                         jub.id AS lineitem,
13456                         NULL AS po_item,
13457                         jub.picklist AS picklist
13458                 FROM
13459                         acq.lineitem jub
13460                 WHERE jub.purchase_order IS NULL
13461                 ]]></oils_persist:source_definition>
13462                 <fields>
13463                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
13464                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
13465                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
13466                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
13467                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
13468                 </fields>
13469                 <links>
13470                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
13471                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
13472                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
13473                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
13474                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
13475                 </links>
13476         </class>
13477         <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">
13478                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
13479                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13480                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13481                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
13482                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
13483                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
13484                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
13485                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
13486                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
13487                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
13488                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
13489                 </fields>
13490                 <links>
13491                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13492                 </links>
13493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13494                         <actions>
13495                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13496                                 <retrieve/>
13497                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13498                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13499                         </actions>
13500                 </permacrud>
13501         </class>
13502
13503         <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">
13504                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
13505                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13506                         <field name="date_applied" reporter:datatype="timestamp"/>
13507                         <field name="org" reporter:datatype="org_unit"/>
13508                         <field name="original_value" reporter:datatype="text"/>
13509                         <field name="new_value" reporter:datatype="text"/>
13510                         <field name="field_name" reporter:datatype="link"/>
13511                 </fields>
13512                 <links>
13513                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
13514                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
13515                 </links>
13516         </class>
13517         <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">
13518                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13519                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13520                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13521                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13522                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13523                 </fields>
13524                 <links>
13525                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13526                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
13527                 </links>
13528         </class>
13529         <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">
13530                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13531                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13532                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13533                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13534                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13535                 </fields>
13536                 <links>
13537                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13538                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
13539                 </links>
13540         </class>
13541         <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">
13542                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
13543                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
13544                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13545                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
13546                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
13547                 </fields>
13548                 <links>
13549                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
13550                 </links>
13551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13552                         <actions>
13553                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13554                                 <retrieve/>
13555                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13556                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13557                         </actions>
13558                 </permacrud>
13559         </class>
13560         <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">
13561                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
13562                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13563                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
13564                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
13565                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
13566                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
13567                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
13568                 </fields>
13569                 <links>
13570                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
13571                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
13572                 </links>
13573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13574                         <actions>
13575                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13576                                 <retrieve/>
13577                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13578                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13579                         </actions>
13580                 </permacrud>
13581         </class>
13582         <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">
13583                 <fields oils_persist:primary="code">
13584                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
13585                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
13586                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13587                 </fields>
13588                 <links>
13589                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13590                 </links>
13591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13592                         <actions>
13593                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13594                                 <retrieve/>
13595                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13596                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13597                         </actions>
13598                 </permacrud>
13599         </class>
13600         <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">
13601                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
13602                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13603                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
13604                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
13605                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13606                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
13607                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
13608                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13609                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
13610                 </fields>
13611                 <links>
13612                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
13613                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13614                 </links>
13615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13616                         <actions>
13617                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
13618                                 <retrieve/>
13619                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
13620                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
13621                         </actions>
13622                 </permacrud>
13623         </class>
13624         <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">
13625                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
13626                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13627                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
13628                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
13629                 </fields>
13630                 <links>
13631                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13632                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
13633                 </links>
13634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13635                         <actions>
13636                                 <create permission="UPDATE_COPY">
13637                     <context link="copy" field="circ_lib"/>
13638                 </create>
13639                                 <retrieve/>
13640                                 <update permission="UPDATE_COPY">
13641                     <context link="copy" field="circ_lib"/>
13642                 </update>
13643                                 <delete permission="UPDATE_COPY">
13644                     <context link="copy" field="circ_lib"/>
13645                 </delete>
13646                         </actions>
13647                 </permacrud>
13648         </class>
13649         <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">
13650         <oils_persist:source_definition><![CDATA[
13651         SELECT ahcm.target_copy AS id,count(*) AS count
13652          FROM
13653          action.hold_request ahr,
13654          action.hold_copy_map ahcm
13655          WHERE
13656          ahr.cancel_time IS NULL AND
13657          ahr.fulfillment_time IS NULL AND
13658          ahr.capture_time IS NULL AND
13659          ahr.id = ahcm.hold
13660          GROUP BY ahcm.target_copy
13661         ]]></oils_persist:source_definition>
13662         <fields oils_persist:primary="id">
13663             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13664             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
13665         </fields>
13666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13667             <actions>
13668                <retrieve/>
13669             </actions>
13670         </permacrud>
13671         </class>
13672
13673         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
13674                 oils_obj:fieldmapper="config::workstation_setting_type" 
13675                 oils_persist:tablename="config.workstation_setting_type" 
13676                 reporter:label="Workstation Setting Type">
13677                 <fields oils_persist:primary="name">
13678                         <field name="name" reporter:datatype="text"/>
13679                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
13680                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
13681                         <field name="datatype" reporter:datatype="text"/>
13682                         <field name="fm_class" reporter:datatype="text"/>
13683                         <field name="grp" reporter:datatype="link"/>
13684                 </fields>
13685                 <links>
13686                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13687                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13688                 </links>
13689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13690                         <actions>
13691                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13692                                 <retrieve/>
13693                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13694                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13695                         </actions>
13696                 </permacrud>
13697         </class>
13698
13699         <!-- no pcrud access is granted for now, because it's assumed these
13700                          setting values will be applied and retrived via the API. -->
13701         <class id="awss" 
13702                 controller="open-ils.cstore"
13703                 oils_obj:fieldmapper="actor::workstation_setting" 
13704                 oils_persist:tablename="actor.workstation_setting" 
13705                 reporter:label="Workstation Setting">
13706                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13707                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13708                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13709                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13710                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13711                 </fields>
13712                 <links>
13713                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13714                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13715                 </links>
13716         </class>
13717
13718         <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">
13719         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13720                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13721                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13722                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13723         </fields>
13724         </class>
13725
13726         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13727                 oils_obj:fieldmapper="config::print_template" 
13728                 oils_persist:tablename="config.print_template" 
13729                 reporter:label="Print Templates">
13730                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13731                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13732                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13733                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13734                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13735                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13736                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13737                         <field name="content_type" reporter:datatype="text"/>
13738                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13739                 </fields>
13740                 <links>
13741                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13742                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13743                 </links>
13744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13745                         <actions>
13746                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13747                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13748                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13749                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13750                         </actions>
13751                 </permacrud>
13752         </class>
13753
13754         <class id="cct" 
13755                 controller="open-ils.cstore open-ils.pcrud"
13756                 oils_obj:fieldmapper="config::carousel_type" 
13757                 oils_persist:tablename="config.carousel_type" 
13758                 reporter:label="Carousel Types">
13759                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13760                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13761                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13762                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13763                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13764                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13765                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13766                 </fields>
13767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13768                         <actions>
13769                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13770                                 <retrieve/>
13771                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13772                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13773                         </actions>
13774                 </permacrud>
13775         </class>
13776
13777         <class id="cc" 
13778                 controller="open-ils.cstore open-ils.pcrud"
13779                 oils_obj:fieldmapper="container::carousel" 
13780                 oils_persist:tablename="container.carousel" 
13781                 reporter:label="Carousels">
13782                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13783                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13784                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13785                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13786                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13787                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13788                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13789                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13790                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13791                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13792                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13793                         <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 -->
13794                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13795                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13796                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13797                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13798                 </fields>
13799                 <links>
13800                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13801                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13802                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13803                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13804                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13805                 </links>
13806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13807                         <actions>
13808                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13809                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13810                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13811                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13812                         </actions>
13813                 </permacrud>
13814         </class>
13815
13816         <class id="ccou" 
13817                 controller="open-ils.cstore open-ils.pcrud"
13818                 oils_obj:fieldmapper="container::carousel_org_unit" 
13819                 oils_persist:tablename="container.carousel_org_unit" 
13820                 reporter:label="Carousels Visible at Library">
13821                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13822                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13823                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13824                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13825                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13826                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13827                 </fields>
13828                 <links>
13829                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13830                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13831                 </links>
13832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13833                         <actions>
13834                                 <create permission="ADMIN_CAROUSEL">
13835                                     <context link="carousel" field="owner" />
13836                                 </create>
13837                                 <retrieve permission="ADMIN_CAROUSEL">
13838                                     <context link="carousel" field="owner" />
13839                                 </retrieve>
13840                                 <update permission="ADMIN_CAROUSEL">
13841                                     <context link="carousel" field="owner" />
13842                                 </update>
13843                                 <delete permission="ADMIN_CAROUSEL">
13844                                     <context link="carousel" field="owner" />
13845                                 </delete>
13846                         </actions>
13847                 </permacrud>
13848         </class>
13849
13850         <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">
13851                 <fields oils_persist:primary="name">
13852                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13853                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13854                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13855                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13856                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13857                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13858                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13859                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13860                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13861                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13862                 </fields>
13863                 <links>
13864                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13865                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13866                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13867                 </links>
13868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13869                         <actions>
13870                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13871                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13872                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13873                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13874                         </actions>
13875                 </permacrud>
13876         </class>
13877         <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">
13878                 <fields oils_persist:primary="id" oils_persist:sequence="config.geolocation_service_id_seq">
13879                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
13880                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true"/>
13881                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13882                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
13883                         <field reporter:label="Service Code" name="service_code" reporter:datatype="text"/>
13884                         <field reporter:label="API Key" name="api_key" reporter:datatype="text"/>
13885                 </fields>
13886                 <links>
13887                         <link field="owner" reltype="has_a" key="id" class="aou"/>
13888                 </links>
13889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13890                         <actions>
13891                                 <create permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13892                                 <retrieve permission="VIEW_GEOLOCATION_SERVICES" global_required="true"/>
13893                                 <update permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13894                                 <delete permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13895                         </actions>
13896                 </permacrud>
13897         </class>
13898
13899         <!-- ********************************************************************************************************************* -->
13900 </IDL>
13901
13902 <!--
13903     vim:noet:ts=4:sw=4:
13904 -->