]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1737019 Add an active flag to funding sources
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                         <field name="debit_card_payment" oils_persist:virtual="true" />
98                 </fields>
99                 <links>
100                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
101                 </links>
102         </class>
103
104         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
105                 <fields>
106                         <field name="id" oils_persist:virtual="true" />
107                         <field name="children" oils_persist:virtual="true" />
108                         <field name="owner_doc" oils_persist:virtual="true" />
109                         <field name="intra_doc_id" oils_persist:virtual="true" />
110                         <field name="parent_node" oils_persist:virtual="true" />
111                         <field name="node_type" oils_persist:virtual="true" />
112                         <field name="namespace_uri" oils_persist:virtual="true" />
113                         <field name="name" oils_persist:virtual="true" />
114                         <field name="value" oils_persist:virtual="true" />
115                 </fields>
116         </class>
117
118         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
119                 <fields>
120                         <field name="title" oils_persist:virtual="true" />
121                         <field name="author" oils_persist:virtual="true" />
122                         <field name="doc_id" oils_persist:virtual="true" />
123                         <field name="doc_type" oils_persist:virtual="true" />
124                         <field name="pubdate" oils_persist:virtual="true" />
125                         <field name="isbn" oils_persist:virtual="true" />
126                         <field name="publisher" oils_persist:virtual="true" />
127                         <field name="tcn" oils_persist:virtual="true" />
128                         <field name="subject" oils_persist:virtual="true" />
129                         <field name="types_of_resource" oils_persist:virtual="true" />
130                         <field name="call_numbers" oils_persist:virtual="true" />
131                         <field name="edition" oils_persist:virtual="true" />
132                         <field name="online_loc" oils_persist:virtual="true" />
133                         <field name="synopsis" oils_persist:virtual="true" />
134                         <field name="physical_description" oils_persist:virtual="true" />
135                         <field name="toc" oils_persist:virtual="true" />
136                         <field name="copy_count" oils_persist:virtual="true" />
137                         <field name="series" oils_persist:virtual="true" />
138                         <field name="serials" oils_persist:virtual="true" />
139                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
140                 </fields>
141         </class>
142
143         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
144                 <fields>
145                         <field name="err_msg" oils_persist:virtual="true" />
146                         <field name="type" oils_persist:virtual="true" />
147                 </fields>
148         </class>
149
150         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
151                 <fields>
152                         <field name="err_msg" oils_persist:virtual="true" />
153                         <field name="type" oils_persist:virtual="true" />
154                 </fields>
155         </class>
156
157         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
158                 <fields oils_persist:primary="matchpoint">
159                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
160                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
161                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
162                 </fields>
163                 <links>
164                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
165                 </links>
166         </class>
167
168         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
169         <!-- when the time is right, turn me into a view.  -->
170                 <fields>
171             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
172             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
174             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
176             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
177             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
179             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
180             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
181                 </fields>
182         </class>
183
184         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
185                 <fields>
186                         <field name="public_name" oils_persist:virtual="true" />
187                         <field name="target_url" oils_persist:virtual="true" />
188                         <field name="target_coverage" oils_persist:virtual="true" />
189                         <field name="target_embargo" oils_persist:virtual="true" />
190                 </fields>
191         </class>
192
193         <!-- Actually in the DB -->
194         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
195                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
196                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
197                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
199                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
200                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
201                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
202                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
203                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
204                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
205                 </fields>
206                 <links>
207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
208                 </links>
209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
210                         <actions>
211                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
212                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
213                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
214                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
215                         </actions>
216                 </permacrud>
217         </class>
218
219         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
220                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
221                         <field reporter:label="Field ID" name="id" reporter:datatype="id" reporter:selector="field"/>
222                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
223                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
224                 </fields>
225                 <links>
226                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
227                 </links>
228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
229                         <actions>
230                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </create>
233                                 <retrieve/>
234                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </update>
237                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
238                     <context link="grp" field="owner"/>
239                 </delete>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <class  id="rrbs" 
245             controller="open-ils.cstore open-ils.pcrud" 
246             oils_obj:fieldmapper="rating::record_badge_score" 
247             oils_persist:tablename="rating.record_badge_score" 
248             reporter:label="Statistical Popularity Badge">
249                 <fields oils_persist:primary="id" 
250                 oils_persist:sequence="rating.record_badge_score_id_seq">
251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
252                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
253                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
254                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
255                 </fields>
256         <links>
257             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
258             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
259         </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <retrieve/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267         <class  id="rp" 
268             controller="open-ils.cstore open-ils.pcrud" 
269             oils_obj:fieldmapper="rating::popularity_parameter" 
270             oils_persist:tablename="rating.popularity_parameter" 
271             reporter:label="Statistical Popularity Parameter">
272                 <fields oils_persist:primary="id" 
273                 oils_persist:sequence="rating.popularity_parameter_id_seq">
274                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
275                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
276                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
277                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
278                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
279                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
280                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
281                 </fields>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
285                                 <retrieve/>
286                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
287                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <class  id="rb" 
293             controller="open-ils.cstore open-ils.pcrud" 
294             oils_obj:fieldmapper="rating::badge" 
295             oils_persist:tablename="rating.badge" 
296             reporter:label="Statistical Popularity Badge">
297                 <fields oils_persist:primary="id" 
298                 oils_persist:sequence="rating.badge_id_seq">
299                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
303                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
304                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
307                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
308                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
309                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
310                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
311                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
312                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
313                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
314                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
315                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
316                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
317                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
318                 </fields>
319                 <links>
320                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
321                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
322                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
323                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
324                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
329                                 <retrieve/>
330                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
331                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <class  id="vibtg" 
337             controller="open-ils.cstore open-ils.pcrud" 
338             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
339             oils_persist:tablename="vandelay.import_bib_trash_group" 
340             reporter:label="Import/Overlay Field Groups for Removal">
341                 <fields oils_persist:primary="id" 
342                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
346                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
347                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
352                 </links>
353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
354                         <actions>
355                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                                 <retrieve/>
357                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
358                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                         </actions>
360                 </permacrud>
361         </class>
362
363
364         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
366                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
368                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
369                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
370                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
371                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
372                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
373                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
374                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
375                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
376                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
377                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
378                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
379                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
380                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
382                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
383                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
384                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
385                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
386                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
387                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
388                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
389                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
390                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
391                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
392                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
393                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
394                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
395                 </fields>
396                 <links>
397                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
398                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
399                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <create permission="CREATE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </create>
407                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </retrieve>
410                                 <update permission="UPDATE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </update>
413                                 <delete permission="DELETE_IMPORT_ITEM">
414                     <context link="definition" field="owner"/>
415                                 </delete>
416                         </actions>
417                 </permacrud>
418         </class>
419
420         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
421                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
423                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
424                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
425                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
426                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
427                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
428                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
429                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
430                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
431                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
432                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
433                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
434                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
435                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
436                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
437                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
438                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
439                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
440                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
441                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
442                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
443                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
444                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
445                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
446                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
447                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
448                 </fields>
449                 <links>
450                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
451                 </links>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
456                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
457                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
464                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
465                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
467                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
468                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
469                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
470                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
471                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
472                 </fields>
473                 <links>
474                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
475                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
476                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
477                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
478                 </links>
479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
480                         <actions>
481                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
485                         </actions>
486                 </permacrud>
487         </class>
488
489         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
490                 <fields oils_persist:primary="code">
491                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
493                 </fields>
494                 <links>
495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
496                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
497                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
498                 </links>
499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
500                         <actions>
501                                 <retrieve/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
508                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
509                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
510                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
512                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
513                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
514                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
515                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
516                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
517                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
518                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
522                 </fields>
523                 <links>
524                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
525                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
526                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
527                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
528             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
529             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
530             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
531                 </links>
532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
533                         <actions>
534                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
538                         </actions>
539                 </permacrud>
540         </class>
541
542         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
543                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
545                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
546                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
547                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
548                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
549                 </fields>
550                 <links/>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
554                 <retrieve/>
555                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
556                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
563                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
565                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
566                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
567                 </fields>
568                 <links>
569                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
570                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
571                 </links>
572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573                         <actions>
574                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
578                         </actions>
579                 </permacrud>
580         </class>
581
582         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
583                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
584                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
585                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
586                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
587                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
588                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
589                 </fields>
590                 <links>
591                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
592                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
593                 </links>
594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
595                         <actions>
596                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
600                         </actions>
601                 </permacrud>
602         </class>
603
604         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
605                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
606                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
607                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
609                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
610                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
611                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
612                 </fields>
613                 <links>
614                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
615                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
616                 </links>
617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618                         <actions>
619                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                         </actions>
624                 </permacrud>
625         </class>
626
627         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
629                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
630                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
631                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
633                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
634                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
635                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
636                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
637                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
638                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
639                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
641                 </fields>
642                 <links>
643                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
644                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
645                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
646             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
647             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
648                 </links>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
660                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
662                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
665                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
666                 </fields>
667                 <links/>
668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669                         <actions>
670                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                 <retrieve/>
672                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
673                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                         </actions>
675                 </permacrud>
676         </class>
677
678         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
679                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
680                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
681                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
682                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
683                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
684                 </fields>
685                 <links>
686                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
687                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
688                 </links>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
700                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
701                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
703                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
704                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
705                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
706                 </fields>
707                 <links>
708                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
709                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
710                 </links>
711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
712                         <actions>
713                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                         </actions>
718                 </permacrud>
719         </class>
720
721         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
722                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
723                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
724                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
726                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
727                 </fields>
728                 <links>
729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
730                 </links>
731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
732                         <actions>
733                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                         </actions>
738                 </permacrud>
739         </class>
740
741         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
742                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
743                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
744                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
745                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
746                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
747                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
748                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
749                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
750             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
751                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
752                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
753                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
754                 </fields>
755                 <links>
756                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
757                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
758                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
759                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
760                 </links>
761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
762                         <actions>
763                                 <create permission="ADMIN_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </create>
766                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </retrieve>
769                                 <update permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </update>
772                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
773                     <context link="match_set" field="owner"/>
774                                 </delete>
775                         </actions>
776                 </permacrud>
777         </class>
778
779         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
780                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
781                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
782                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
783                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
784                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
785                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
786                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
787                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
788                 </fields>
789                 <links>
790                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
791                 </links>
792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
793                         <actions>
794                                 <create permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </create>
797                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </retrieve>
800                                 <update permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </update>
803                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
804                     <context link="match_set" field="owner"/>
805                                 </delete>
806                         </actions>
807                 </permacrud>
808         </class>
809
810         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
811                 oils_obj:fieldmapper="vandelay::session_tracker" 
812                 oils_persist:tablename="vandelay.session_tracker" 
813                 reporter:label="Vandelay Session Tracker">
814                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
815                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
818                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
819                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
820                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
821                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
822                                          queue or an auth queue and there's no IDL class for vandelay.queue .
823                                          parent table.
824                         -->
825                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
826                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
827                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="State" name="state" reporter:datatype="text"/>
829                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
830                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
831                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
832                 </fields>
833                 <links>
834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
835                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
836                 </links>
837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
838                         <actions>
839                                 <!-- created by the API -->
840                                 <retrieve global_required="true"
841                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
842                                 <update global_required="true"
843                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
844                                         <context link="workstation" field="owning_lib"/>
845                                 </update>
846                                 <delete 
847                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
848                                         <context link="workstation" field="owning_lib"/>
849                                 </delete>
850                         </actions>
851                 </permacrud>
852         </class>
853
854         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
856                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
857                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
858                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
860                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
861                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
862                 </fields>
863                 <links>
864                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
866                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
868                 </links>
869         </class>
870
871     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
872         <fields oils_persist:primary="name">
873             <field reporter:label="Name" name="name" reporter:datatype="text"/>
874             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
875             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
876             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
877         </fields>
878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
879             <actions>
880                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884             </actions>
885         </permacrud>
886     </class>
887
888     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
889         <fields oils_persist:primary="id">
890             <field reporter:label="ID" name="id" reporter:datatype="id"/>
891             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
892             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
894             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
895         </fields>
896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897             <actions>
898                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899                 <retrieve/>
900                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
901                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902             </actions>
903         </permacrud>
904     </class>
905
906         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
907                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
909                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
910                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
911                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
912                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
913                 </fields>
914                 <links>
915                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
916                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921                 <retrieve/>
922                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
923                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924             </actions>
925         </permacrud>
926         </class>
927
928         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
929                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
930                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
931                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
933         </fields>
934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935             <actions>
936                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
937                 <retrieve/>
938                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
939                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
940             </actions>
941         </permacrud>
942         </class>
943
944         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
945                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
946                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
947                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
948                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
949                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
953                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
954                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
955                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
956                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
957         </fields>
958                 <links>
959                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
961         </links>
962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
963             <actions>
964                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
965                 <retrieve/>
966                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
967                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
968             </actions>
969         </permacrud>
970         </class>
971
972         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
973                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
974                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
975                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
976                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
980                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
981                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
982                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
983                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
984         </fields>
985                 <links>
986                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
988         </links>
989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
990             <actions>
991                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
992                 <retrieve/>
993                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
994                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
995             </actions>
996         </permacrud>
997         </class>
998
999         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
1000                 <fields oils_persist:primary="name">
1001                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1002                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1004                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1005                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1006                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1007                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1008                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1009                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1010                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1011                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1012                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1013                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1014                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1015                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1016                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1017                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1018                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1019                 </fields>
1020                 <links>
1021                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1022                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_SVF" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_SVF" global_required="true"/>
1029                 <delete permission="ADMIN_SVF" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1037                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1038                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1039             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1040                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1041                 </fields>
1042                 <links/>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046                 <retrieve/>
1047                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1048                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1054                 <fields oils_persist:primary="coded_value">
1055                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1056                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1057                 </fields>
1058                 <links>
1059                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1060                 </links>
1061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1062             <actions>
1063                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1064                 <retrieve/>
1065                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1066                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1067             </actions>
1068         </permacrud>
1069         </class>
1070
1071         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1073                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1074                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1075                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1076                 </fields>
1077                 <links>
1078                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1079                 </links>
1080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1081             <actions>
1082                 <retrieve/>
1083             </actions>
1084         </permacrud>
1085         </class>
1086
1087
1088         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1090                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1091                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1092                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1093                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1094                 </fields>
1095                 <links>
1096                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1097                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106
1107         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1108                 <fields oils_persist:primary="source">
1109                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1110                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1111                 </fields>
1112                 <links>
1113                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1114                 </links>
1115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116             <actions>
1117                 <retrieve/>
1118             </actions>
1119         </permacrud>
1120         </class>
1121
1122         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1123                 <fields>
1124                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1125                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1126                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1127                 </fields>
1128                 <links>
1129                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1130                 </links>
1131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1132             <actions>
1133                 <retrieve/>
1134             </actions>
1135         </permacrud>
1136         </class>
1137
1138         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1139                 <fields oils_persist:primary="id">
1140                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1141                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1142                 </fields>
1143                 <links>
1144                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <retrieve/>
1149             </actions>
1150         </permacrud>
1151         </class>
1152
1153         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1154                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1156                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1157                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1158                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1159                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1160                 </fields>
1161                 <links>
1162                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1163                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1164                 </links>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1170                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1177                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1178                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1179                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1180                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1181                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1182                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1183                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1185             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1186             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1187                 </fields>
1188                 <links>
1189                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1190                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1191                 </links>
1192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1193             <actions>
1194                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1195                 <retrieve/>
1196                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1197                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1198             </actions>
1199         </permacrud>
1200         </class>
1201
1202         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1203                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1204                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1205                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1206                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1207                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1208                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1209                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1210                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1211                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1212                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1213                 </fields>
1214                 <links>
1215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1216                 </links>
1217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218             <actions>
1219                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223             </actions>
1224         </permacrud>
1225         </class>
1226
1227     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1228         <fields oils_persist:primary="name">
1229             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1230             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1231             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1232             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1233             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1234             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1235             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1236             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1237             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1238             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1239         </fields>
1240         <links>
1241             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1242             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1243         </links>
1244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1245             <actions>
1246                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247                 <retrieve/>
1248                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1249                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250             </actions>
1251         </permacrud>
1252     </class>
1253
1254     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1255         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1256             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1257             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1258             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1259             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1260             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1261             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1262             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1263         </fields>
1264         <links>
1265             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1266         </links>
1267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1268             <actions>
1269                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270                 <retrieve/>
1271                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1272                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273             </actions>
1274         </permacrud>
1275     </class>
1276
1277     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1278                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1279                         oils_persist:tablename="config.z3950_index_field_map" 
1280                         reporter:label="Z39.50 Index Field Map">
1281         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1282             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1283             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1284             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1285             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1286             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1288         </fields>
1289         <links>
1290             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1291             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1292             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1293         </links>
1294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1295             <actions>
1296                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297                 <retrieve/>
1298                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1299                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300             </actions>
1301         </permacrud>
1302     </class>
1303
1304
1305         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1306                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1307                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1308                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1309                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1310                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1311                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1312                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                 </fields>
1314                 <links>
1315             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1316             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1317                 </links>
1318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1319                         <actions>
1320                                 <retrieve/>
1321                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1322                         </actions>
1323                 </permacrud>
1324         </class>
1325
1326         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1327                 <fields oils_persist:primary="key">
1328                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1329                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1330                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1331                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1332                 </fields>
1333                 <links/>
1334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335                         <actions>
1336                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1337                                 <retrieve/>
1338                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1339                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1340                         </actions>
1341                 </permacrud>
1342         </class>
1343
1344         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1345                 <fields oils_persist:primary="module">
1346                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1348                 </fields>
1349                 <links/>
1350         </class>
1351
1352         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1353                 <fields oils_persist:primary="module">
1354                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1355                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359                         <actions>
1360                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1361                                 <retrieve/>
1362                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1363                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1364                         </actions>
1365                 </permacrud>
1366         </class>
1367
1368         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1369                 <fields oils_persist:primary="module">
1370                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375                         <actions>
1376                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1377                                 <retrieve/>
1378                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1379                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1385                 <fields oils_persist:primary="module">
1386                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1387                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391                         <actions>
1392                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1393                                 <retrieve/>
1394                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1395                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1396                         </actions>
1397                 </permacrud>
1398         </class>
1399
1400         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1401                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1402                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1403                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1404                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1405                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1406                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1407                 </fields>
1408                 <links>
1409                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1410                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1411                 </links>
1412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1413                         <actions>
1414                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </create>
1417                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </retrieve>
1420                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </update>
1423                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1424                     <context link="event_def" field="owner"/>
1425                 </delete>
1426                         </actions>
1427                 </permacrud>
1428         </class>
1429
1430         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1431                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1432                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1433                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1434                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1435                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1436                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1437                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1438                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1439                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1440                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1441                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1442                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1443                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1444                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1445                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1446                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1447                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1448                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1449                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1450                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1451                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1452                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1453                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1454                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1455                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1456                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1457                 </fields>
1458                 <links>
1459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1460                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1461                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1462                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1463                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1464                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1465                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1466                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1467                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1468                 </links>
1469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1470                         <actions>
1471                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1473                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1474                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1475                         </actions>
1476                 </permacrud>
1477         </class>
1478
1479         <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">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_id_seq">
1481                         <field reporter:label="Group ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1483                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1484                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1485                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1486                         <field reporter:label="Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
1487                 </fields>
1488                 <links>
1489                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1490                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1491                         <link field="members" reltype="has_many" key="grp" map="" class="atevdefgm"/>
1492                 </links>
1493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1494                         <actions>
1495                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1496                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1497                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1498                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1499                         </actions>
1500                 </permacrud>
1501         </class>
1502
1503         <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">
1504                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_member_id_seq">
1505                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1506                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1507                         <field reporter:label="Group" name="grp"  reporter:datatype="link"/>
1508                         <field reporter:label="Event Definition" name="event_def"  reporter:datatype="link"/>
1509                         <field reporter:label="Sortable" name="sortable" reporter:datatype="bool"/>
1510                         <field reporter:label="Include Holdings" name="holdings" reporter:datatype="bool"/>
1511                         <field reporter:label="Externally Processed" name="external" reporter:datatype="bool"/>
1512                 </fields>
1513                 <links>
1514                         <link field="grp" reltype="has_a" key="id" map="" class="atevdefg"/>
1515                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1516                 </links>
1517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1518                         <actions>
1519                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1520                     <context link="grp" field="owner"/>
1521                 </create>
1522                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1523                     <context link="grp" field="owner"/>
1524                 </retrieve>
1525                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1526                     <context link="grp" field="owner"/>
1527                 </update>
1528                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1529                     <context link="grp" field="owner"/>
1530                 </delete>
1531                         </actions>
1532                 </permacrud>
1533         </class>
1534
1535         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1536                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1537                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1538                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1539                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1540                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1541                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1542                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1543                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1544                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1545                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1546                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1547                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1548                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1549                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1550                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1551                 </fields>
1552                 <links>
1553                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1554                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1555                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1556                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1557                 </links>
1558         </class>
1559
1560         <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">
1561                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1562                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1563                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1564                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1565                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1566                 </fields>
1567                 <links>
1568                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1569                 </links>
1570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1571                         <actions>
1572                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1573                     <context link="event_def" field="owner"/>
1574                 </create>
1575                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1576                     <context link="event_def" field="owner"/>
1577                 </retrieve>
1578                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1579                     <context link="event_def" field="owner"/>
1580                 </update>
1581                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1582                     <context link="event_def" field="owner"/>
1583                 </delete>
1584                         </actions>
1585                 </permacrud>
1586         </class>
1587
1588         <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">
1589                 <oils_persist:source_definition><![CDATA[
1590                 SELECT  atevdef.hook,
1591                         atevdef.name,
1592                         atevdef.reactor,
1593                         atev.id,
1594                         atev.event_def,
1595                         atev.add_time,
1596                         atev.run_time,
1597                         atev.start_time,
1598                         atev.update_time,
1599                         atev.complete_time,
1600                         atev.update_process,
1601                         atev.state,
1602                         atev.user_data,
1603                         atev.template_output,
1604                         atev.error_output,
1605                         atev.async_output,
1606                         targ_circ.id AS target_circ,
1607                         targ_ahr.id AS target_hold,
1608                         COALESCE(
1609                                 targ_circ.circ_lib,
1610                                 targ_ahr.pickup_lib
1611                         ) AS perm_lib
1612                 FROM action_trigger.event atev
1613                 JOIN action_trigger.event_definition atevdef ON
1614                         (atevdef.id = atev.event_def)
1615                 JOIN action_trigger.hook ath ON
1616                         (ath.key = atevdef.hook)
1617                 LEFT JOIN action.circulation targ_circ ON
1618                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1619                 LEFT JOIN action.hold_request targ_ahr ON
1620                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1621                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1622                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1623                                 'circ.staff.max_visible_event_age',
1624                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1625                         ) UNION
1626                         SELECT '1000 YEARS'::INTERVAL AS value
1627                 ) ous)
1628                 ]]></oils_persist:source_definition>
1629                 <fields oils_persist:primary="id">
1630                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1631                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1632                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1633                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1634                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1635                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1636                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1637                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1638                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1639                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1640                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1641                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1642                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1643                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1644                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1645                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1646                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1647                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1648                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1649                 </fields>
1650                 <links>
1651                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1652                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1653                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1654                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1655                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1656                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1657                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1658                 </links>
1659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660                         <actions>
1661                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1662                         </actions>
1663                 </permacrud>
1664         </class>
1665
1666         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1667                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1668                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1669                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1670                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1671                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1672                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1673                 </fields>
1674                 <links>
1675                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1676                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1677                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1678                 </links>
1679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1680                         <actions>
1681                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1682                         </actions>
1683                 </permacrud>
1684         </class>
1685
1686         <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">
1687                 <fields oils_persist:primary="code">
1688                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1689                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1690                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1691                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1692                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1693                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1694                 </fields>
1695                 <links/>
1696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1697             <actions>
1698                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1699                 <retrieve/>
1700                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1701                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1702             </actions>
1703         </permacrud>
1704         </class>
1705
1706         <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">
1707                 <fields oils_persist:primary="code">
1708                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1709                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1710                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1711                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1712                 </fields>
1713                 <links/>
1714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1715             <actions>
1716                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1717                 <retrieve/>
1718                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1719                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1720             </actions>
1721         </permacrud>
1722         </class>
1723
1724         <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">
1725                 <fields oils_persist:primary="code">
1726                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1727                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1728                 </fields>
1729                 <links/>
1730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1731             <actions>
1732                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1733                 <retrieve/>
1734                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1735                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1736             </actions>
1737         </permacrud>
1738         </class>
1739
1740         <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">
1741                 <fields oils_persist:primary="code">
1742                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1743                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1744                 </fields>
1745                 <links/>
1746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1747             <actions>
1748                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1749                 <retrieve/>
1750                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1751                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1752             </actions>
1753         </permacrud>
1754         </class>
1755
1756         <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">
1757                 <fields oils_persist:primary="code">
1758                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1759                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1760                 </fields>
1761                 <links/>
1762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1763             <actions>
1764                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1765                 <retrieve/>
1766                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1767                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1768             </actions>
1769         </permacrud>
1770         </class>
1771
1772         <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">
1773                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1774                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1775                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1776                 </fields>
1777                 <links/>
1778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1779             <actions>
1780                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1781                 <retrieve/>
1782                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1783                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1784             </actions>
1785         </permacrud>
1786         </class>
1787
1788         <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">
1789                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1790                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1791                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1792                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1793                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1794                 </fields>
1795         <links>
1796             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1797             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1798             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1799         </links>
1800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1801             <actions>
1802                 <create permission="UPDATE_COPY">
1803                     <context link="target_copy" field="circ_lib"/>
1804                 </create>
1805                 <retrieve/>
1806                 <update permission="UPDATE_COPY">
1807                     <context link="target_copy" field="circ_lib"/>
1808                 </update>
1809                 <delete permission="UPDATE_COPY">
1810                     <context link="target_copy" field="circ_lib"/>
1811                 </delete>
1812             </actions>
1813         </permacrud>
1814         </class>
1815
1816         <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">
1817                 <fields oils_persist:primary="code">
1818                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1819                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1820                 </fields>
1821                 <links/>
1822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1823             <actions>
1824                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1825                 <retrieve/>
1826                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1827                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1828             </actions>
1829         </permacrud>
1830         </class>
1831
1832         <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">
1833                 <fields oils_persist:primary="code">
1834                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1835                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1836                 </fields>
1837                 <links/>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1841                 <retrieve/>
1842                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1843                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847
1848         <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">
1849                 <fields oils_persist:primary="code">
1850                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1851                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1852                 </fields>
1853                 <links/>
1854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1855             <actions>
1856                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1857                 <retrieve/>
1858                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1859                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1860             </actions>
1861         </permacrud>
1862         </class>
1863
1864     <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">
1865         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1866             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1867             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1868             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1869             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1870             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1871             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1872             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1873             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1874             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1875             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1876             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1877             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1878             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1879             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1880             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1881             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1882             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1883         </fields>
1884         <links/>
1885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1886             <actions>
1887                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1888                 <retrieve/>
1889                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1890                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1891             </actions>
1892         </permacrud>
1893     </class>
1894
1895     <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">
1896         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1897             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1898             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1899             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1900             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1901             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1902             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1903             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1904             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1905             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1906             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1907             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1908             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1909             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1910             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1911             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1912             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1913             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1914             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1915             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1916         </fields>
1917         <links/>
1918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1919             <actions>
1920                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1921                 <retrieve/>
1922                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1923                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1924             </actions>
1925         </permacrud>
1926     </class>
1927
1928     <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">
1929         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1930             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1931             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1932             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1933             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1934             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1935         </fields>
1936         <links>
1937             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1938             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1939             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1940         </links>
1941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1942             <actions>
1943                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1944                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1945                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1946                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1947             </actions>
1948         </permacrud>
1949     </class>
1950
1951         <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">
1952                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1953                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1954                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1955                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1956                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1957                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1958                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1959                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1960                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1961                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1962                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1963                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1964                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1965                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1966                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1967                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1968                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1969             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1970                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1971                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1972                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1973                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1974                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1975                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1984                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1985                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1986                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1987                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1988                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1989                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1990                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1991                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1992             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1993                 </links>
1994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1995             <actions>
1996                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1997                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1998                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1999                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2000             </actions>
2001         </permacrud>
2002         </class>
2003
2004         <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">
2005                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
2006                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2007                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
2008                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2009                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
2010                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
2011                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
2012                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
2013                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
2014                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2015                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
2016                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2017                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2018                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2019                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2020                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2021             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
2022                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
2023                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
2024             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2025                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
2026                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
2027                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2028                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2029             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2030             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
2031             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
2032                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
2033                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
2034                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
2035                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2036                 </fields>
2037                 <links>
2038                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2039                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2040                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2041                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2042                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2043                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2044                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2045                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2046                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2047                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2048                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2049                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
2050                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
2051                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
2052             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2053                 </links>
2054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2055             <actions>
2056                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2057                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2058                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2059                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2060             </actions>
2061         </permacrud>
2062         </class>
2063
2064     <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">
2065         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2066             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2067             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2068             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2069         </fields>
2070         <links/>
2071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2072             <actions>
2073                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2074                 <retrieve/>
2075                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2076                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2077             </actions>
2078         </permacrud>
2079     </class>
2080
2081     <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">
2082         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2083             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2084             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2085             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2086             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2087             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2088             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2089             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2090         </fields>
2091         <links>
2092             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2093         </links>
2094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2095             <actions>
2096                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2097                 <retrieve/>
2098                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2099                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2100             </actions>
2101         </permacrud>
2102     </class>
2103
2104     <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">
2105         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2106             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2107             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2108             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2109             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2110             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2111         </fields>
2112         <links>
2113             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2114             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2115         </links>
2116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2117             <actions>
2118                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2119                     <context link="matchpoint" field="org_unit"/>
2120                 </create>
2121                 <retrieve/>
2122                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2123                     <context link="matchpoint" field="org_unit"/>
2124                 </update>
2125                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2126                     <context link="matchpoint" field="org_unit"/>
2127                 </delete>
2128             </actions>
2129         </permacrud>
2130     </class>
2131
2132     <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">
2133         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2134             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2135             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2136             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2137         </fields>
2138         <links>
2139             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2140             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2141         </links>
2142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2143             <actions>
2144                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </create>
2147                 <retrieve/>
2148                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2149                     <context link="limit_set" field="owning_lib"/>
2150                 </update>
2151                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2152                     <context link="limit_set" field="owning_lib"/>
2153                 </delete>
2154             </actions>
2155         </permacrud>
2156     </class>
2157     <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">
2158         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2159             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2160             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2161             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2162         </fields>
2163         <links>
2164             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2165             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2166         </links>
2167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2168             <actions>
2169                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2170                     <context link="limit_set" field="owning_lib"/>
2171                 </create>
2172                 <retrieve/>
2173                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2174                     <context link="limit_set" field="owning_lib"/>
2175                 </update>
2176                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2177                     <context link="limit_set" field="owning_lib"/>
2178                 </delete>
2179             </actions>
2180         </permacrud>
2181     </class>
2182
2183     <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">
2184         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2185             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2186             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2187             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2188             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2189         </fields>
2190         <links>
2191             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2192             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2193         </links>
2194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2195             <actions>
2196                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2197                     <context link="limit_set" field="owning_lib"/>
2198                 </create>
2199                 <retrieve/>
2200                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2201                     <context link="limit_set" field="owning_lib"/>
2202                 </update>
2203                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2204                     <context link="limit_set" field="owning_lib"/>
2205                 </delete>
2206             </actions>
2207         </permacrud>
2208     </class>
2209
2210         <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">
2211                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2212                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2213                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2214                 </fields>
2215                 <links/>
2216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2217             <actions>
2218                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2219                 <retrieve/>
2220                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2221                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2222             </actions>
2223         </permacrud>
2224         </class>
2225
2226         <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">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2228                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2229                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2230                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2232                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2233                 </fields>
2234                 <links>
2235                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2236                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2237                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2238                 </links>
2239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2240             <actions>
2241                 <create permission="ADMIN_SURVEY">
2242                     <context link="survey" field="owner"/>
2243                 </create>
2244                 <retrieve/>
2245                 <update permission="ADMIN_SURVEY">
2246                     <context link="survey" field="owner"/>
2247                 </update>
2248                 <delete permission="ADMIN_SURVEY">
2249                     <context link="survey" field="owner"/>
2250                 </delete>
2251             </actions>
2252         </permacrud>
2253         </class>
2254         <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">
2255                 <fields oils_persist:primary="id" oils_persist:sequence="">
2256                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2257                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2258                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2259                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2260                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2261                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2262                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2263                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2264                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2265                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2266                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2267                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2268                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2269                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2270                 </fields>
2271                 <links>
2272                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2273                 </links>
2274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2275                         <actions>
2276                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2277                                         <context link="usr" field="home_ou" />
2278                                 </retrieve>
2279                         </actions>
2280                 </permacrud>
2281         </class>
2282         <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">
2283                 <fields oils_persist:primary="id" oils_persist:sequence="">
2284                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2285                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2286                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2287                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2288                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2289                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2290                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2291                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2292                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2293                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2294                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2295                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2296                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2297                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2298                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2299                 </fields>
2300                 <links>
2301                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2302                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2303                 </links>
2304         </class>
2305         <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">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2307                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2308                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2309                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2310                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2311                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2312                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2313                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2314                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2315                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2316                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2317                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2318                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2319                 </fields>
2320                 <links>
2321                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2322                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2323                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2324                 </links>
2325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2326                         <actions> <!-- created magically, so no create action -->
2327                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2328                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2329                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2330                         </actions>
2331                 </permacrud>
2332         </class>
2333         <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)">
2334                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2335                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2336                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2337                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2338                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2339                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2340                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2341                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2342                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2343                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2344                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2345                         <field reporter:label="Editor" name="usr" reporter:datatype="link" />
2346                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2347                 </fields>
2348                 <links>
2349                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2350                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2351                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2352                 </links>
2353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2354                         <actions> <!-- created magically, so no create action -->
2355                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2356                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2357                         </actions>
2358                 </permacrud>
2359         </class>
2360         <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">
2361         <fields oils_persist:primary="id">
2362                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2363                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Debug: Set Date (Penalty)" name="ausp_set_date" reporter:datatype="timestamp"/>
2365                         <field reporter:label="Debug: Creation Date/Time (Message)" name="aum_create_date" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2367                         <field reporter:label="Creating Library" name="org_unit" reporter:datatype="link"/>
2368                         <field reporter:label="Debug: Creating Library (Penalty)" name="ausp_org_unit" reporter:datatype="link"/>
2369                         <field reporter:label="Debug: Creating Library (Message)" name="aum_sending_lib" reporter:datatype="link"/>
2370                         <field reporter:label="Debug: Penalty ID" name="ausp_id" reporter:datatype="id" />
2371                         <field reporter:label="Debug: Message ID" name="aum_id" reporter:datatype="id" />
2372                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2373                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2374                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2375                         <field reporter:label="Debug: User (Penalty)" name="ausp_usr" reporter:datatype="link" />
2376                         <field reporter:label="Debug: User (Message)" name="aum_usr" reporter:datatype="link" />
2377                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2378                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2379                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2380                         <field reporter:label="Debug: Stop Date/Time (Penalty)" name="ausp_stop_date" reporter:datatype="timestamp"/>
2381                         <field reporter:label="Debug: Stop Date/Time (Message)" name="aum_stop_date" reporter:datatype="timestamp"/>
2382                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2383                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2384                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2385                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2386                         <field name="ausp_usr_message" reporter:datatype="link" reporter:label="Debug: User Message (Penalty)"/>
2387                 </fields>
2388                 <links>
2389                         <link field="ausp_id" reltype="has_a" key="id" map="" class="ausp"/>
2390                         <link field="aum_id" reltype="has_a" key="id" map="" class="aum"/>
2391                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2392                         <link field="ausp_usr" reltype="has_a" key="id" map="" class="au"/>
2393                         <link field="aum_usr" reltype="has_a" key="id" map="" class="au"/>
2394                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2395                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2396                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2397                         <link field="aum_sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2398                         <link field="ausp_org_unit" reltype="has_a" key="id" map="" class="aou"/>
2399                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2400                         <link field="ausp_usr_message" reltype="has_a" key="id" map="" class="aum"/>
2401                 </links>
2402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2403                         <actions> <!-- created magically, so no create action -->
2404                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2405                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2406                         </actions>
2407                 </permacrud>
2408         </class>
2409
2410         <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">
2411                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2412                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2413                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2414                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2415                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2416                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2417                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2418                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2419                 </fields>
2420                 <links>
2421                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2422                 </links>
2423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2424                         <actions>
2425                                 <create permission="UPDATE_USER">
2426                                         <context link="usr" field="home_ou"/>
2427                                 </create>
2428                                 <retrieve permission="VIEW_USER">
2429                                         <context link="usr" field="home_ou"/>
2430                                 </retrieve>
2431                                 <update permission="UPDATE_USER">
2432                                         <context link="usr" field="home_ou"/>
2433                                 </update>
2434                                 <delete permission="UPDATE_USER">
2435                                         <context link="usr" field="home_ou"/>
2436                                 </delete>
2437                         </actions>
2438                 </permacrud>
2439         </class>
2440         <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">
2441                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2442                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2443                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2444                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2445                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2446                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2447                 </fields>
2448                 <links>
2449                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2450                 </links>
2451         </class>
2452         <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">
2453                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2454                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2455                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2456                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2457                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2458                 </fields>
2459                 <links>
2460                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2461                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2462                 </links>
2463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2464                         <actions>
2465                                 <retrieve permission="VIEW_USER">
2466                                         <context link="usr" field="home_ou" />
2467                                 </retrieve>
2468                         </actions>
2469                 </permacrud>
2470         </class>
2471         <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">
2472                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2473                         <field name="field" reporter:datatype="link"/>
2474                         <field name="id" reporter:datatype="id" />
2475                         <field name="source" reporter:datatype="link"/>
2476                         <field name="value" reporter:datatype="text"/>
2477                 </fields>
2478                 <links>
2479                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2480                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2481                 </links>
2482         </class>
2483         <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">
2484                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2485                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2486                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2487                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2488                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2489                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2490                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2491                 </fields>
2492                 <links>
2493                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2494                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2495                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2496                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2497                 </links>
2498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2499                         <actions>
2500                                 <retrieve/>
2501                         </actions>
2502                 </permacrud>
2503         </class>
2504         <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">
2505                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2506                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2507                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2508                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2509                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2510                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2511                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2512                 </fields>
2513                 <links>
2514                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2515                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2516                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2517                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2518                 </links>
2519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2520                         <actions>
2521                                 <retrieve/>
2522                         </actions>
2523                 </permacrud>
2524         </class>
2525         <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">
2526                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2527                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2528                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2529                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2530                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2531                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2532                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2533                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2534                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2535                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2536                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2537                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2538                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2539                 </fields>
2540                 <links>
2541                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2542                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2543                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2544                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2545                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2546                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2547                 </links>
2548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2549             <actions>
2550                 <create permission="TRANSIT_COPY" context_field="owner">
2551                     <context link="target_copy" field="circ_lib"/>
2552                 </create>
2553                 <retrieve/>
2554                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2555                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2556             </actions>
2557         </permacrud>
2558         </class>
2559         <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">
2560                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2561                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2562                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2563                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2564                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2565                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2566                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2567                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2568                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2569                 </fields>
2570                 <links>
2571                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2572                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2573                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2574                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2575                 </links>
2576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2577             <actions>
2578                 <create permission="ADMIN_SURVEY">
2579                     <context link="survey" field="owner"/>
2580                 </create>
2581                 <retrieve permission="VIEW_USER">
2582                     <context link="usr" field="home_ou"/>
2583                 </retrieve>
2584                 <update permission="ADMIN_SURVEY">
2585                     <context link="survey" field="owner"/>
2586                 </update>
2587                 <delete permission="ADMIN_SURVEY">
2588                     <context link="survey" field="owner"/>
2589                 </delete>
2590             </actions>
2591         </permacrud>
2592         </class>
2593         <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">
2594                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2595                         <field name="bucket" />
2596                         <field name="id" reporter:datatype="id" />
2597                         <field name="target_copy" reporter:datatype="link"/>
2598                         <field name="create_time" reporter:datatype="timestamp" />
2599                         <field name="pos" reporter:datatype="int" />
2600                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2601                 </fields>
2602                 <links>
2603                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2604                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2605             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2606                 </links>
2607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2608                         <actions>
2609                                 <retrieve permission="ADMIN_COPY_BUCKET">
2610                     <context link="bucket" owning_lib="owning_lib"/>
2611                 </retrieve>
2612             </actions>
2613         </permacrud>
2614         </class>
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2617                         <field name="id" reporter:datatype="id" />
2618                         <field name="item" reporter:datatype="link"/>
2619                         <field name="note" reporter:datatype="text" />
2620                 </fields>
2621                 <links>
2622                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2623                 </links>
2624         </class>
2625
2626         <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">
2627                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2628                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2630                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2631                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2632                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2633                 </fields>
2634                 <links>
2635                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2636                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2637                 </links>
2638                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2639                         <actions>
2640                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2641                                 <retrieve/>
2642                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2643                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2644                         </actions>
2645                 </permacrud>
2646         </class>
2647
2648         <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">
2649                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2650                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2651                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2652                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2653                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2654                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2655                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2656                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2657                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2658                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2659                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2660                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2661                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2662                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2663                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2664                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2665                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2666                 </fields>
2667                 <links>
2668                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2669                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2670                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2671                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2672                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2673                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2674                         <link field="heading_field" reltype="has_a" key="id" map="" class="ahf"/>
2675                 </links>
2676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2677                         <actions>
2678                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2679                                 <retrieve/>
2680                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2681                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2682                         </actions>
2683                 </permacrud>
2684         </class>
2685
2686         <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">
2687                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2688                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2689                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2690                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2691                 </fields>
2692                 <links>
2693                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2694                 </links>
2695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2696                         <actions>
2697                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2698                                 <retrieve/>
2699                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2700                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2701                         </actions>
2702                 </permacrud>
2703         </class>
2704
2705         <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">
2706                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2707                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2708                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2709                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2710                 </fields>
2711                 <links>
2712                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2713                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2714                 </links>
2715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2716                         <actions>
2717                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2718                                 <retrieve/>
2719                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2720                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2721                         </actions>
2722                 </permacrud>
2723         </class>
2724
2725         <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">
2726                 <fields oils_persist:primary="code">
2727                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2728                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2729                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2730                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2731                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2732                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2733                 </fields>
2734                 <links>
2735                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2736                 </links>
2737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2738                         <actions>
2739                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2740                                 <retrieve/>
2741                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2742                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2743                         </actions>
2744                 </permacrud>
2745         </class>
2746
2747         <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">
2748                 <fields oils_persist:primary="code">
2749                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2750                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2751                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2752                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2753                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2754                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2755                 </fields>
2756                 <links>
2757                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2758                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2759                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2760                 </links>
2761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2762                         <actions>
2763                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2764                                 <retrieve/>
2765                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2766                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2767                         </actions>
2768                 </permacrud>
2769         </class>
2770
2771     <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">
2772         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2773             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2774             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2775             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2776         </fields>
2777         <links>
2778             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2779             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2780         </links>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2786                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2787             </actions>
2788         </permacrud>
2789     </class>
2790
2791         <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">
2792                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2793                         <field name="active" reporter:datatype="bool"/>
2794                         <field name="create_date" reporter:datatype="timestamp"/>
2795                         <field name="creator" />
2796                         <field name="deleted" reporter:datatype="bool"/>
2797                         <field name="edit_date" reporter:datatype="timestamp"/>
2798                         <field name="editor" />
2799                         <field name="id" reporter:datatype="id" />
2800                         <field name="last_xact_id" />
2801                         <field name="marc" />
2802                         <field name="source" />
2803                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2804                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2805                         <field name="heading" />
2806                         <field name="simple_heading" />
2807                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2808                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2809                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2810                 </fields>
2811                 <links>
2812                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2813                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2814                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2815                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2816                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2817                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2818                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2819                 </links>
2820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2821                         <actions>
2822                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2823                                 <retrieve/>
2824                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2825                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2826                         </actions>
2827                 </permacrud>
2828         </class>
2829         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2830                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2831                         <field name="char_encoding" />
2832                         <field name="id" />
2833                         <field name="record" />
2834                         <field name="record_status" />
2835                         <field name="thesaurus" />
2836                 </fields>
2837                 <links>
2838                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2839                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2840                 </links>
2841         </class>
2842         <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">
2843                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2844                         <field name="id" reporter:datatype="id" />
2845                         <field name="bib" reporter:datatype="link" />
2846                         <field name="authority" reporter:datatype="link" />
2847                 </fields>
2848                 <links>
2849                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2850                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2851                 </links>
2852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2853                         <actions>
2854                                 <retrieve/>
2855                         </actions>
2856                 </permacrud>
2857         </class>
2858         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2859                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2860                         <field name="id" reporter:datatype="id" />
2861                         <field name="record" reporter:datatype="link" />
2862                         <field name="atag" reporter:datatype="link" />
2863                         <field name="value" reporter:datatype="text" />
2864                         <field name="thesaurus" reporter:datatype="text" />
2865                 </fields>
2866                 <links>
2867                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2868                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2869                 </links>
2870         </class>
2871
2872         <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">
2873                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2874                         <field name="id" reporter:datatype="id" reporter:selector="label" />
2875                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2876                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2877                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2878                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2879                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2880                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2881                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2882                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2883                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2884                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2885                 </fields>
2886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887                         <actions>
2888                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2889                                 <retrieve/>
2890                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2891                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2892                         </actions>
2893                 </permacrud>
2894         </class>
2895
2896         <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">
2897                 <fields oils_persist:primary="code" oils_persist:sequence="">
2898                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2899                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2900                 </fields>
2901                 <links/>
2902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2903             <actions>
2904                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2905                 <retrieve/>
2906                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2907                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2908             </actions>
2909         </permacrud>
2910         </class>
2911         <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">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2913                         <field name="accepting_usr" />
2914                         <field name="amount" reporter:datatype="money" />
2915                         <field name="amount_collected" reporter:datatype="money" />
2916                         <field name="approval_code" reporter:datatype="text"/>
2917                         <field name="cash_drawer" reporter:datatype="link"/>
2918                         <field name="cc_number" reporter:datatype="text"/>
2919                         <field name="cc_order_number" reporter:datatype="text"/>
2920                         <field name="cc_processor" reporter:datatype="text"/>
2921                         <field name="id" reporter:datatype="id" />
2922                         <field name="note" reporter:datatype="text"/>
2923                         <field name="payment_ts" reporter:datatype="timestamp"/>
2924                         <field name="xact" reporter:datatype="link"/>
2925                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2926                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2927                 </fields>
2928                 <links>
2929                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2930                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2931                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2932                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2933                 </links>
2934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2935             <actions>
2936                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2937                     <context link="xact" jump="usr" field="home_ou"/>
2938                 </retrieve>
2939                         </actions>
2940                 </permacrud>
2941         </class>
2942         <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">
2943                 <fields oils_persist:primary="name">
2944                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2945                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2946                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2947                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2948                 </fields>
2949                 <links/>
2950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2951             <actions>
2952                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2953                 <retrieve/>
2954                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2955                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2956             </actions>
2957         </permacrud>
2958         </class>
2959
2960         <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">
2961                 <fields oils_persist:primary="alias">
2962                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2963                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2964                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2965                 </fields>
2966                 <links>
2967                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2968                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2969                 </links>
2970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2971             <actions>
2972                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2973                 <retrieve/>
2974                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2975                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2976             </actions>
2977         </permacrud>
2978         </class>
2979
2980         <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">
2981                 <fields oils_persist:primary="name">
2982                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2983                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2984                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2985                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2986                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2987                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2988                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2989                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2990                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2991                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2992                 </fields>
2993                 <links>
2994                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2995                 </links>
2996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2997             <actions>
2998                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2999                 <retrieve/>
3000                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
3001                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
3002             </actions>
3003         </permacrud>
3004         </class>
3005
3006         <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">
3007                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
3008                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
3009                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
3010                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3011                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3012                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
3013                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
3014                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
3015                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
3016                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
3017                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
3018                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
3019                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
3020                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
3021                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
3022                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
3023                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
3024                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
3025                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3026                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
3027                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
3028                 </fields>
3029                 <links>
3030                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
3031                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3032                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
3033                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
3034                 </links>
3035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3036             <actions>
3037                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3038                 <retrieve/>
3039                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3040                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3041             </actions>
3042         </permacrud>
3043         </class>
3044
3045         <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">
3046                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
3047                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3048                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
3049                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
3050                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
3051                 </fields>
3052                 <links>
3053                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
3054                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
3055                 </links>
3056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3057             <actions>
3058                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3059                 <retrieve/>
3060                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3061                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3062             </actions>
3063         </permacrud>
3064         </class>
3065
3066         <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">
3067                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
3068                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
3069                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3070                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
3071                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
3072                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
3073                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
3074                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
3075                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
3076                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
3077                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
3078                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
3079                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
3080                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
3081                 </fields>
3082                 <links>
3083                 </links>
3084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3085                         <actions>
3086                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3087                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3088                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3089                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3090                         </actions>
3091                 </permacrud>
3092         </class>
3093         <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">
3094                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3095                         <field name="id" reporter:datatype="id" />
3096                         <field name="name" reporter:datatype="text"/>
3097                         <field name="xpath" reporter:datatype="text"/>
3098                         <field name="format" reporter:datatype="link"/>
3099                         <field name="first_word" reporter:datatype="bool" />
3100                 </fields>
3101                 <links/>
3102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3103             <actions>
3104                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3105                 <retrieve/>
3106                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3107                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3108             </actions>
3109         </permacrud>
3110         </class>
3111         <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">
3112                 <fields oils_persist:primary="code" oils_persist:sequence="">
3113                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3114                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3115                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3116                 </fields>
3117                 <links/>
3118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3119             <actions>
3120                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3121                 <retrieve/>
3122                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3123                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3124             </actions>
3125         </permacrud>
3126         </class>
3127         <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">
3128                 <fields oils_persist:primary="code" oils_persist:sequence="">
3129                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3130                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3131                 </fields>
3132                 <links/>
3133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3134             <actions>
3135                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3136                 <retrieve/>
3137                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3138                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3139             </actions>
3140         </permacrud>
3141         </class>
3142     <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">
3143         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_id_seq">
3144             <field reporter:label="ID" name="id" reporter:datatype="id" />
3145             <field reporter:label="Course Name" name="name" reporter:datatype="text" oils_obj:required="true" />
3146             <field reporter:label="Course Number" name="course_number" reporter:datatype="text" oils_obj:required="true" />
3147             <field reporter:label="Section Number" name="section_number" reporter:datatype="text" />
3148             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3149             <field reporter:label="Course Members" name="members" oils_persist:virtual="true" reporter:datatype="link" />
3150             <field reporter:label="Course Materials" name="materials" oils_persist:virtual="true" reporter:datatype="link" />
3151             <field reporter:label="Is Archived?" name="is_archived" reporter:datatype="bool" />
3152                         <field reporter:label="Terms Taught" name="terms_map" oils_persist:virtual="true" reporter:datatype="link" config_field="true" />
3153         </fields>
3154         <links>
3155             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3156             <link field="members" reltype="has_many" key="course" map="" class="acmcu" />
3157             <link field="materials" reltype="has_many" key="course" map="" class="acmcm" />
3158                         <link field="terms_map" reltype="has_many" key="course" map="" class="acmtcm" />
3159         </links>
3160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3161             <actions>
3162                 <create permission="MANAGE_RESERVES" context_field="owning_lib"/>
3163                 <retrieve/>
3164                 <update permission="MANAGE_RESERVES" context_field="owning_lib"/>
3165                 <delete permission="MANAGE_RESERVES" context_field="owning_lib"/>
3166             </actions>
3167         </permacrud>
3168     </class>
3169     <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">
3170         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_users_id_seq">
3171             <field reporter:label="ID" name="id" reporter:datatype="id" />
3172             <field reporter:label="Course" name="course" reporter:datatype="link" />
3173             <field reporter:label="User" name="usr" reporter:datatype="link" />
3174             <field reporter:label="User Role" name="usr_role" reporter:datatype="link" />
3175         </fields>
3176         <links>
3177             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3178             <link field="usr" reltype="has_a" key="id" map="" class="au" />
3179             <link field="usr_role" reltype="has_a" key="id" map="" class="acmr" />
3180         </links>
3181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3182             <actions>
3183                 <create permission="MANAGE_RESERVES">
3184                                         <context link="course" field="owning_lib" />
3185                 </create>
3186                 <retrieve/>
3187                 <update permission="MANAGE_RESERVES">
3188                                         <context link="course" field="owning_lib" />
3189                 </update>
3190                 <delete permission="MANAGE_RESERVES">
3191                                         <context link="course" field="owning_lib" />
3192                 </delete>
3193             </actions>
3194         </permacrud>
3195     </class>
3196     <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">
3197         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_materials_id_seq">
3198             <field reporter:label="ID" name="id" reporter:datatype="id" />
3199             <field reporter:label="Course" name="course" reporter:datatype="link" />
3200             <field reporter:label="Item" name="item" reporter:datatype="link" />
3201             <field reporter:label="Record" name="record" reporter:datatype="link" />
3202             <field reporter:label="Record is temporary?" name="temporary_record" reporter:datatype="bool" />
3203             <field reporter:label="Item Relationship" name="relationship" reporter:datatype="text" />
3204             <field reporter:label="Original Status" name="original_status" reporter:datatype="link" />
3205             <field reporter:label="Original Circ Modifier" name="original_circ_modifier" reporter:datatype="link" />
3206             <field reporter:label="Original Shelving Location" name="original_location" reporter:datatype="link" />
3207             <field reporter:label="Original Callnumber" name="original_callnumber" reporter:datatype="link" />
3208         </fields>
3209         <links>
3210             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3211             <link field="item" reltype="has_a" key="id" map="" class="acp" />
3212             <link field="record" reltype="has_a" key="id" map="" class="bre" />
3213             <link field="original_callnumber" reltype="has_a" key="id" map="" class="acn" />
3214             <link field="original_status" reltype="has_a" key="id" map="" class="ccs" />
3215             <link field="original_circ_modifier" reltype="has_a" key="code" map="" class="ccm" />
3216             <link field="original_location" reltype="has_a" key="id" map="" class="acpl" />
3217         </links>
3218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3219             <actions>
3220                 <create permission="MANAGE_RESERVES">
3221                                         <context link="course" field="owning_lib" />
3222                 </create>
3223                 <retrieve/>
3224                 <update permission="MANAGE_RESERVES">
3225                                         <context link="course" field="owning_lib" />
3226                 </update>
3227                 <delete permission="MANAGE_RESERVES">
3228                                         <context link="course" field="owning_lib" />
3229                 </delete>
3230             </actions>
3231         </permacrud>
3232     </class>
3233         <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">
3234                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_id_seq">
3235                         <field reporter:label="Term ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3236                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3237             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3238                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3239                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3240                         <field reporter:label="Courses" name="courses" reporter:datatype="link" oils_persist:virtual="true"/>
3241                         <field reporter:label="Course Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
3242                 </fields>
3243                 <links>
3244             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3245                         <link field="courses" reltype="has_many" key="term" map="course" class="acmtcm"/>
3246                         <link field="maps" reltype="has_many" key="term" map="" class="acmtcm"/>
3247                 </links>
3248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3249                         <actions>
3250                                 <create permission="MANAGE_RESERVES" context_field="owning_lib" />
3251                                 <retrieve/>
3252                                 <update permission="MANAGE_RESERVES" context_field="owning_lib" />
3253                                 <delete permission="MANAGE_RESERVES" context_field="owning_lib" />
3254                         </actions>
3255                 </permacrud>
3256         </class>
3257     <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">
3258         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_course_map_id_seq">
3259             <field reporter:label="Course Term Map ID" name="id" reporter:datatype="id"/>
3260             <field reporter:label="Term" name="term" oils_obj:required="true" reporter:datatype="link"/>
3261             <field reporter:label="Course" name="course" reporter:datatype="link" oils_obj:required="true"/>
3262         </fields>
3263         <links>
3264             <link field="term" reltype="has_a" key="id" map="" class="acmt"/>
3265             <link field="course" reltype="has_a" key="id" map="" class="acmc"/>
3266         </links>
3267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3268             <actions>
3269                 <create permission="MANAGE_RESERVES">
3270                                         <context link="course" field="owning_lib" />
3271                 </create>
3272                 <retrieve/>
3273                 <update permission="MANAGE_RESERVES">
3274                                         <context link="course" field="owning_lib" />
3275                 </update>
3276                 <delete permission="MANAGE_RESERVES">
3277                                         <context link="course" field="owning_lib" />
3278                 </delete>
3279             </actions>
3280         </permacrud>
3281     </class>
3282         <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">
3283                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_role_id_seq">
3284                         <field reporter:label="Role ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3285                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3286             <field reporter:label="OPAC Viewable?" name="is_public" reporter:datatype="bool" />
3287                 </fields>
3288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3289                         <actions>
3290                                 <create permission="MANAGE_RESERVES" global_required="true" />
3291                                 <retrieve/>
3292                                 <update permission="MANAGE_RESERVES" global_required="true" />
3293                                 <delete permission="MANAGE_RESERVES" global_required="true" />
3294                         </actions>
3295                 </permacrud>
3296         </class>
3297         
3298     <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">
3299         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3300             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3301             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3302             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3303             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3304         </fields>
3305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3306             <actions>
3307                 <retrieve/>
3308             </actions>
3309         </permacrud>
3310     </class>
3311         <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">
3312                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3313                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3314                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3315                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3316                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3317                 </fields>
3318                 <links>
3319                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3320                 </links>
3321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3322             <actions>
3323                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3324                 <retrieve/>
3325                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3326                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3327             </actions>
3328         </permacrud>
3329         </class>
3330         <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">
3331                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3332                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3333                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3334                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3335                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3336                 </fields>
3337                 <links>
3338                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3339                 </links>
3340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3341             <actions>
3342                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3343                 <retrieve/>
3344                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3345                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3346             </actions>
3347         </permacrud>
3348         </class>
3349         <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">
3350                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3351                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3352                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3353                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3354                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3355                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3356                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3357                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3358                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3359                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3360                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3361                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3362                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3363                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3364                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3365                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3366                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3367                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3368                         <field reporter:label="Dewey Classification" name="dewey" oils_persist:virtual="true" reporter:datatype="link"/>
3369                 </fields>
3370                 <links>
3371                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3372                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3373                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3374                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3375                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3376                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3377                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3378                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3379                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3380                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3381                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3382                         <link field="dewey" reltype="might_have" key="call_number" map="" class="racnd"/>
3383                 </links>
3384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3385             <actions>
3386                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3387                 <retrieve/>
3388                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3389                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3390             </actions>
3391         </permacrud>
3392         </class>
3393         <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">
3394                 <fields oils_persist:primary="call_number">
3395                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link" />
3396                         <field reporter:label="Dewey Number" name="dewey" reporter:datatype="text"/>
3397                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
3398                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
3399                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
3400                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
3401                 </fields>
3402                 <links>
3403                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3404                 </links>
3405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3406             <actions>
3407                 <retrieve/>
3408             </actions>
3409         </permacrud>
3410         </class>
3411         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3412                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3413                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3414                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3415                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3416                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3417                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3418                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3419                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3420                 </fields>
3421                 <links>
3422                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3423                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3424         </links>
3425         </class>
3426         <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">
3427                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3428                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3429                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3430                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3431                 </fields>
3432                 <links>
3433                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3434                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3435                 </links>
3436         </class>
3437         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3438                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3439                         <field name="id" reporter:datatype="id" />
3440                         <field name="value" oils_persist:i18n="true" />
3441                 </fields>
3442                 <links/>
3443         </class>
3444         <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">
3445                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3446                         <field name="balance_owed" reporter:datatype="money" />
3447                         <field name="total_owed" reporter:datatype="money" />
3448                         <field name="total_paid" reporter:datatype="money" />
3449                         <field name="usr" reporter:datatype="link"/>
3450                 </fields>
3451                 <links>
3452                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3453         </links>
3454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3455             <actions>
3456                 <retrieve permission="VIEW_USER">
3457                     <context link="usr" field="home_ou"/>
3458                 </retrieve>
3459             </actions>
3460         </permacrud>
3461         </class>
3462         <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">
3463                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3464                         <field name="balance_owed" reporter:datatype="money" />
3465                         <field name="total_owed" reporter:datatype="money" />
3466                         <field name="total_paid" reporter:datatype="money" />
3467                         <field name="usr" reporter:datatype="link"/>
3468                 </fields>
3469                 <links>
3470                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3471         </links>
3472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3473             <actions>
3474                 <retrieve permission="VIEW_USER">
3475                     <context link="usr" field="home_ou"/>
3476                 </retrieve>
3477             </actions>
3478         </permacrud>
3479         </class>
3480         <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">
3481                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3482                         <field name="collector" />
3483                         <field name="enter_time" reporter:datatype="timestamp"/>
3484                         <field name="id" reporter:datatype="id" />
3485                         <field name="location" reporter:datatype="link"/>
3486                         <field name="usr" reporter:datatype="link"/>
3487                 </fields>
3488                 <links>
3489                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3490                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3491                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3492                 </links>
3493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3494             <actions>
3495                 <create permission="money.collections_tracker.create" context_field="location"/>
3496                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3497                 <delete permission="money.collections_tracker.create" context_field="location"/>
3498             </actions>
3499         </permacrud>
3500         </class>
3501         <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">
3502                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3503                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3504                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3505                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3506                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3507                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3508                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3509                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3510                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3511                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3512                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3513                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3514                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3515                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3516                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3517                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3518                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3519                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3520                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3521                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3522                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3525                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3527                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3528                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3529                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3530                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3531                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3532                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3533                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3534                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3535                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3536                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3537                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3538                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3539                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3540                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3541                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3542                 </fields>
3543                 <links>
3544                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3545                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3546                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3547                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3548                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3549                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3550                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3551                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3552                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3553                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3554                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3555                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3556                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3557                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3558                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3559                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3560                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3561                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3562                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3563                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3564                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3565                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3566                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3567                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3568                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3569                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3570                 </links>
3571         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3572             <actions>
3573                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3574                 <retrieve/>
3575                 <update permission="UPDATE_MARC" global_required="true"/>
3576                 <!-- 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. -->
3577                 <delete permission="DELETE_RECORD" global_required="true"/>
3578             </actions>
3579         </permacrud>
3580         </class>
3581         <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">
3582                 <fields oils_persist:primary="id">
3583                         <field name="dow_0_close" />
3584                         <field name="dow_0_open" />
3585                         <field name="dow_1_close" />
3586                         <field name="dow_1_open" />
3587                         <field name="dow_2_close" />
3588                         <field name="dow_2_open" />
3589                         <field name="dow_3_close" />
3590                         <field name="dow_3_open" />
3591                         <field name="dow_4_close" />
3592                         <field name="dow_4_open" />
3593                         <field name="dow_5_close" />
3594                         <field name="dow_5_open" />
3595                         <field name="dow_6_close" />
3596                         <field name="dow_6_open" />
3597                         <field name="id" reporter:datatype="id" />
3598                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3599                 </fields>
3600                 <links>
3601                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3602                 </links>
3603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3604             <actions>
3605                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3606                 <retrieve/>
3607                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3608                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3609             </actions>
3610         </permacrud>
3611         </class>
3612         <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">
3613                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3614                         <field name="id" reporter:datatype="id" />
3615                         <field name="record" reporter:datatype="link"/>
3616                         <field name="label" reporter:datatype="text"/>
3617                         <field name="label_sortkey" reporter:datatype="text"/>
3618                         <field name="deleted" reporter:datatype="bool"/>
3619                 </fields>
3620                 <links>
3621                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3622                 </links>
3623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3624             <actions>
3625                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3626                 <retrieve/>
3627                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3628                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3629             </actions>
3630         </permacrud>
3631         </class>
3632         <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">
3633                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3634                         <field name="id" reporter:datatype="id" />
3635                         <field name="target_copy" reporter:datatype="link" />
3636                         <field name="part" reporter:datatype="link"/>
3637                 </fields>
3638                 <links>
3639                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3640                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3641                 </links>
3642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3643             <actions>
3644                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3645                 <retrieve/>
3646                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3647                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3648             </actions>
3649         </permacrud>
3650         </class>
3651     <class  id="aecc"
3652             controller="open-ils.cstore open-ils.pcrud"
3653             oils_obj:fieldmapper="action::emergency_closing_circulation"
3654             oils_persist:tablename="action.emergency_closing_circulation"
3655             reporter:label="Emergency Closing Circulation Entry"
3656             oils_persist:readonly="true"
3657     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3658         <fields oils_persist:primary="id">
3659             <field name="id" reporter:datatype="id" />
3660             <field name="circulation" reporter:datatype="link" />
3661                         <field name="emergency_closing" reporter:datatype="link"/>
3662             <field name="original_due_date" reporter:datatype="timestamp" />
3663             <field name="process_time" reporter:datatype="timestamp" />
3664         </fields>
3665         <links>
3666             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3667             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3668         </links>
3669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3670             <actions>
3671                 <retrieve/>
3672             </actions>
3673         </permacrud>
3674     </class>
3675     <class  id="aecr"
3676             controller="open-ils.cstore open-ils.pcrud"
3677             oils_obj:fieldmapper="action::emergency_closing_reservation"
3678             oils_persist:tablename="action.emergency_closing_reservation"
3679             reporter:label="Emergency Closing Reservation Entry"
3680             oils_persist:readonly="true"
3681     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3682         <fields oils_persist:primary="id">
3683             <field name="id" reporter:datatype="id" />
3684             <field name="reservation" reporter:datatype="link" />
3685                         <field name="emergency_closing" reporter:datatype="link"/>
3686             <field name="original_end_time" reporter:datatype="timestamp" />
3687             <field name="process_time" reporter:datatype="timestamp" />
3688         </fields>
3689         <links>
3690             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3691             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3692         </links>
3693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3694             <actions>
3695                 <retrieve/>
3696             </actions>
3697         </permacrud>
3698     </class>
3699     <class  id="aech"
3700             controller="open-ils.cstore open-ils.pcrud"
3701             oils_obj:fieldmapper="action::emergency_closing_hold"
3702             oils_persist:tablename="action.emergency_closing_hold"
3703             reporter:label="Emergency Closing Hold Entry"
3704             oils_persist:readonly="true"
3705     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3706         <fields oils_persist:primary="id">
3707             <field name="id" reporter:datatype="id" />
3708             <field name="hold" reporter:datatype="link" />
3709                         <field name="emergency_closing" reporter:datatype="link"/>
3710             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3711             <field name="process_time" reporter:datatype="timestamp" />
3712         </fields>
3713         <links>
3714             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3715             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3716         </links>
3717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3718             <actions>
3719                 <retrieve/>
3720             </actions>
3721         </permacrud>
3722     </class>
3723     <class  id="aecs"
3724             controller="open-ils.cstore open-ils.pcrud"
3725             oils_obj:fieldmapper="action::emergency_closing_status"
3726             oils_persist:tablename="action.emergency_closing_status"
3727             reporter:label="Emergency Closing Status"
3728             oils_persist:readonly="true"
3729     >
3730         <fields oils_persist:primary="id">
3731             <field name="id" reporter:datatype="id" />
3732             <field name="creator" reporter:datatype="link" />
3733             <field name="create_time" reporter:datatype="timestamp" />
3734             <field name="process_start_time" reporter:datatype="timestamp" />
3735             <field name="process_end_time" reporter:datatype="timestamp" />
3736             <field name="last_update_time" reporter:datatype="timestamp" />
3737             <field name="circulations" reporter:datatype="int" />
3738             <field name="circulations_complete" reporter:datatype="int" />
3739             <field name="reservations" reporter:datatype="int" />
3740             <field name="reservations_complete" reporter:datatype="int" />
3741             <field name="holds" reporter:datatype="int" />
3742             <field name="holds_complete" reporter:datatype="int" />
3743         </fields>
3744         <links>
3745             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3746         </links>
3747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3748             <actions>
3749                 <retrieve/>
3750             </actions>
3751         </permacrud>
3752     </class>
3753     <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">
3754         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3755             <field name="id" reporter:datatype="id" />
3756             <field name="creator" reporter:datatype="link" />
3757             <field name="create_time" reporter:datatype="timestamp" />
3758             <field name="process_start_time" reporter:datatype="timestamp" />
3759             <field name="process_end_time" reporter:datatype="timestamp" />
3760             <field name="last_update_time" reporter:datatype="timestamp" />
3761             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3762             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3763             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3764             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3765             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3766         </fields>
3767         <links>
3768             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3769             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3770             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3771             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3772             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3773             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3774         </links>
3775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3776             <actions>
3777                 <create permission="EMERGENCY_CLOSING">
3778                     <context link="closing" field="org_unit" />
3779                 </create>
3780                 <retrieve/>
3781                 <update permission="EMERGENCY_CLOSING">
3782                     <context link="closing" field="org_unit" />
3783                 </update>
3784                 <delete permission="EMERGENCY_CLOSING">
3785                     <context link="closing" field="org_unit" />
3786                 </delete>
3787             </actions>
3788         </permacrud>
3789     </class>
3790         <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">
3791                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3792                         <field name="close_end" reporter:datatype="timestamp" />
3793                         <field name="close_start" reporter:datatype="timestamp" />
3794                         <field name="id" reporter:datatype="id" />
3795                         <field name="org_unit" reporter:datatype="org_unit"/>
3796                         <field name="reason" reporter:datatype="text"/>
3797                         <field name="full_day" reporter:datatype="bool"/>
3798                         <field name="multi_day" reporter:datatype="bool"/>
3799                         <field name="emergency_closing" reporter:datatype="link"/>
3800                 </fields>
3801                 <links>
3802                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3803                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3804                 </links>
3805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3806             <actions>
3807                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3808                 <retrieve/>
3809                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3810                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3811             </actions>
3812         </permacrud>
3813         </class>
3814         <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">
3815                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3816                         <field name="extended" reporter:datatype="interval"/>
3817                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3818                         <field name="max_renewals" reporter:datatype="int" />
3819                         <field name="name" reporter:datatype="text"/>
3820                         <field name="normal" reporter:datatype="interval"/>
3821                         <field name="shrt" reporter:datatype="interval"/>
3822                         <field name="max_auto_renewals" reporter:datatype="int" />
3823                 </fields>
3824                 <links>
3825                 </links>
3826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3827             <actions>
3828                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3829                 <retrieve/>
3830                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3831                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3832             </actions>
3833         </permacrud>
3834         </class>
3835
3836         <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">
3837                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3838                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3839                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3840             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3841                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3842             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3843                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3844                                 reporter:datatype="link" config_field="true"/>
3845                 </fields>
3846                 <links>
3847             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3848                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3849                 </links>
3850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3851             <actions>
3852                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3853                 <retrieve/>
3854                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3855                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3856             </actions>
3857                 </permacrud>
3858         </class>
3859
3860         <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">
3861                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3862                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3863                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3864                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3865             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3866                 </fields>
3867                 <links>
3868                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3869                 </links>
3870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3871             <actions>
3872                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3873                 <retrieve/>
3874                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3875                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3876             </actions>
3877                 </permacrud>
3878         </class>
3879
3880         <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">
3881                 <fields oils_persist:primary="id" oils_persist:sequence="">
3882                         <field name="balance_owed" reporter:datatype="money"/>
3883                         <field name="id" reporter:datatype="id" />
3884                         <field name="last_billing_note" reporter:datatype="text"/>
3885                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3886                         <field name="last_billing_type" reporter:datatype="text"/>
3887                         <field name="last_payment_note" reporter:datatype="text"/>
3888                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3889                         <field name="last_payment_type" reporter:datatype="text"/>
3890                         <field name="total_owed" reporter:datatype="money"/>
3891                         <field name="total_paid" reporter:datatype="money"/>
3892                         <field name="usr" reporter:datatype="link"/>
3893                         <field name="xact_finish" reporter:datatype="timestamp" />
3894                         <field name="xact_start" reporter:datatype="timestamp" />
3895                         <field name="xact_type" reporter:datatype="text"/>
3896                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3897                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3898                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3899                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3900                         <field name="billing_location" reporter:datatype="link"/>
3901                 </fields>
3902                 <links>
3903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3904                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3905                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3906                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3907                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3908                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3909                 </links>
3910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3911                         <actions>
3912                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3913                                         <context link="usr" field="home_ou" />
3914                                 </retrieve>
3915                         </actions>
3916                 </permacrud>
3917         </class>
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3920                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3921                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3922                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3923                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3924                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3925                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3926                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3927                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3928                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3930                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3933                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3934                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3935                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3936                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3937                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3938                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3939                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3940                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3941                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3942                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3943                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3944                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3945                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3946                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3947                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3948                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3949                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3950                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3951                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3952                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3953                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3954                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3955                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3956                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3957                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3958                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3959                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3960                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3961                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3962                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3963                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3964                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3965                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3966                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3967                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3968                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3969                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3970                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3971                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3972                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3973                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3974                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3975                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3976                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3977                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3978                         <field reporter:label="Name Keyword internal tsvector" name="name_kw_tsvector" reporter:datatype="text"/>
3979                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3980                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3981                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3982                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3983                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3984                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3985                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3986                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3987                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3988                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3989                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3990                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3991                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3992                 </fields>
3993                 <links>
3994                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3995                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3996                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3997                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3998                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3999                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
4000                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
4001                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
4002                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
4003                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
4004                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
4005                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
4006                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
4007                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
4008                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
4009                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
4010                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
4011                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
4012                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
4013                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
4014                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
4015                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
4016                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
4017                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
4018                         <link field="notes" reltype="has_many" key="usr" map="" class="aum"/>
4019                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
4020                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
4021                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
4022                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
4023                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
4024                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
4025                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
4026                 </links>
4027                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4028                         <actions>
4029                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
4030                         </actions>
4031                 </permacrud>
4032         </class>
4033         <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">
4034                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
4035                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
4036                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
4037                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
4038                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
4039                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
4040                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
4041                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
4042                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
4043         </fields>
4044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4045                         <actions>
4046                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4047                                 <retrieve/>
4048                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4049                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4050                         </actions>
4051                 </permacrud>
4052         </class>
4053         <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">
4054                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
4055                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4056                         <field name="usr" reporter:label="User" reporter:datatype="link" />
4057                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
4058                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
4059         </fields>
4060         <links>
4061                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4062                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
4063                 </links>
4064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4065                         <actions>
4066                                 <retrieve permission="RUN_REPORTS">
4067                                         <context link="usr" field="home_ou" />
4068                                 </retrieve>
4069                         </actions>
4070                 </permacrud>
4071         </class>
4072         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
4073                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
4074                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4075                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
4076                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
4077                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
4078                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
4079                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
4080         </fields>
4081         <links>
4082                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
4083                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
4084                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
4085                 </links>
4086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4087                         <actions>
4088                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
4089                                         <context link="usr" field="home_ou" />
4090                                         <context link="ws" field="owning_lib" />
4091                                 </retrieve>
4092                                 <create permission="ADMIN_TOOLBAR" context_field="org">
4093                                         <context link="usr" field="home_ou" />
4094                                         <context link="ws" field="owning_lib" />
4095                                 </create>
4096                                 <update permission="ADMIN_TOOLBAR" context_field="org">
4097                                         <context link="usr" field="home_ou" />
4098                                         <context link="ws" field="owning_lib" />
4099                                 </update>
4100                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
4101                                         <context link="usr" field="home_ou" />
4102                                         <context link="ws" field="owning_lib" />
4103                                 </delete>
4104                         </actions>
4105                 </permacrud>
4106         </class>
4107         <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">
4108                 <fields oils_persist:primary="name">
4109                         <field name="name" reporter:datatype="text"/>
4110                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4111                 </fields>
4112                 <links/>
4113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4114                         <actions>
4115                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4116                                 <retrieve/>
4117                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4118                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4119                         </actions>
4120                 </permacrud>
4121         </class>
4122         <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">
4123                 <fields oils_persist:primary="name">
4124                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
4125                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
4126                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
4127                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
4128                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
4129                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
4130                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
4131                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
4132                 </fields>
4133                 <links>
4134                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
4135                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4136                 </links>
4137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4138                         <actions>
4139                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4140                                 <retrieve/>
4141                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4142                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4143                         </actions>
4144                 </permacrud>
4145         </class>
4146         <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">
4147                 <fields oils_persist:primary="name">
4148                         <field name="name" reporter:datatype="text"/>
4149                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4150                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4151                         <field name="datatype" reporter:datatype="text"/>
4152                         <field name="view_perm" reporter:datatype="link"/>
4153                         <field name="update_perm" reporter:datatype="link"/>
4154                         <field name="fm_class" reporter:datatype="text"/>
4155                         <field name="grp" reporter:datatype="link"/>
4156                 </fields>
4157                 <links>
4158                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
4159                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
4160                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
4161                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4162                 </links>
4163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4164                         <actions>
4165                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4166                                 <retrieve/>
4167                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4168                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4169                         </actions>
4170                 </permacrud>
4171         </class>
4172         <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">
4173                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
4174                         <field name="id" />
4175                         <field name="name"  reporter:datatype="text"/>
4176                         <field name="org_unit" reporter:datatype="org_unit"/>
4177                         <field name="value"  reporter:datatype="text"/>
4178                 </fields>
4179                 <links>
4180                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4181                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
4182                 </links>
4183         </class>
4184         <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">
4185                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
4186                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4187                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
4188                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
4189                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
4190                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
4191                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
4192                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
4193                 </fields>
4194                 <links>
4195                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4196                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4197                 </links>
4198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4199             <actions>
4200                 <create permission="CREATE_COPY_NOTE">
4201                     <context link="owning_copy" field="circ_lib"/>
4202                 </create>
4203                 <retrieve permission="VIEW_COPY_NOTES">
4204                     <context link="owning_copy" field="circ_lib"/>
4205                 </retrieve>
4206                 <update permission="UPDATE_COPY_NOTE">
4207                     <context link="owning_copy" field="circ_lib"/>
4208                 </update>
4209                 <delete permission="DELETE_COPY_NOTE">
4210                     <context link="owning_copy" field="circ_lib"/>
4211                 </delete>
4212             </actions>
4213         </permacrud>
4214         </class>
4215         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
4216                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
4217                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
4218                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
4219                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
4220                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4221                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
4222                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
4223                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
4224                 </fields>
4225                 <links>
4226                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4227                 </links>
4228         </class>
4229         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
4230                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
4231                         <field name="fingerprint"  reporter:datatype="text"/>
4232                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
4233                         <field name="master_record" reporter:datatype="link"/>
4234                         <field name="mods"  reporter:datatype="text"/>
4235                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
4236                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4237                 </fields>
4238                 <links>
4239                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
4240                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
4241                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
4242                 </links>
4243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244                         <actions>
4245                                 <retrieve/>
4246                         </actions>
4247                 </permacrud>
4248         </class>
4249         <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">
4250                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
4251                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4252                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4253                 </fields>
4254                 <links/>
4255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4256             <actions>
4257                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
4258                 <retrieve/>
4259                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
4260                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
4261             </actions>
4262         </permacrud>
4263         </class>
4264         <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">
4265                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
4266                         <field name="code"  reporter:datatype="text"/>
4267                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
4268                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
4269                 </fields>
4270                 <links/>
4271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4272             <actions>
4273                 <create permission="CREATE_PERM" global_required="true"/>
4274                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
4275                 <update permission="UPDATE_PERM" global_required="true"/>
4276                 <delete permission="DELETE_PERM" global_required="true"/>
4277             </actions>
4278         </permacrud>
4279         </class>
4280         <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">
4281                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
4282                         <field name="id" reporter:datatype="id" />
4283                         <field name="metarecord" reporter:datatype="link"/>
4284                         <field name="source" reporter:datatype="link"/>
4285                 </fields>
4286                 <links>
4287                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4288                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4289                 </links>
4290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4291                         <actions>
4292                                 <retrieve/>
4293                         </actions>
4294                 </permacrud>
4295         </class>
4296         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4297                         oils_obj:fieldmapper="metabib::display_entry" 
4298                         oils_persist:tablename="metabib.display_entry" 
4299                         oils_persist:field_safe="true"
4300                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4301                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4302                         <field name="id" reporter:datatype="id" />
4303                         <field name="field" reporter:datatype="link"/>
4304                         <field name="source" reporter:datatype="link"/>
4305                         <field name="value"  reporter:datatype="text"/>
4306                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4307                 </fields>
4308                 <links>
4309                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4310                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4311                 </links>
4312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4313                         <actions>
4314                                 <retrieve/>
4315                         </actions>
4316                 </permacrud>
4317         </class>
4318         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4319                 oils_persist:tablename="metabib.flat_display_entry"
4320                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4321                 oils_persist:field_safe="true"
4322                 reporter:label="Flat Display Entry" 
4323                 oils_persist:readonly="true">
4324                 <fields>
4325                         <field name="source" reporter:datatype="id" />
4326                         <field name="name" reporter:datatype="text"/>
4327                         <field name="multi" reporter:datatype="bool"/>
4328                         <field name="label" reporter:datatype="text"/>
4329                         <field name="field" reporter:datatype="link"/>
4330                         <field name="value" reporter:datatype="text"/>
4331                 </fields>
4332                 <links>
4333                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4334                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4335                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4336                 </links>
4337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4338                         <actions>
4339                                 <retrieve/>
4340                         </actions>
4341                 </permacrud>
4342         </class>
4343         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4344                 oils_persist:tablename="metabib.compressed_display_entry"
4345                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4346                 oils_persist:field_safe="true"
4347                 reporter:label="Compressed Display Entry" 
4348                 oils_persist:readonly="true">
4349                 <fields>
4350                         <field name="source" reporter:datatype="id" />
4351                         <field name="name" reporter:datatype="text"/>
4352                         <field name="multi" reporter:datatype="bool"/>
4353                         <field name="label" reporter:datatype="text"/>
4354                         <field name="field" reporter:datatype="link"/>
4355                         <field name="value" reporter:datatype="text"/>
4356                 </fields>
4357                 <links>
4358                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4359                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4360                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4361                 </links>
4362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4363                         <actions>
4364                                 <retrieve/>
4365                         </actions>
4366                 </permacrud>
4367         </class>
4368         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4369                 oils_persist:tablename="metabib.wide_display_entry"
4370                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4371                 oils_persist:field_safe="true"
4372                 reporter:label="Wide Display Entry" 
4373                 oils_persist:readonly="true">
4374                 <fields oils_persist:primary="source">
4375                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4376                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4377                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4378                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4379                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4380                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4381                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4382                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4383                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4384                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4385                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4386                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4387                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4388                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4389                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4390                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4391                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4392                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4393                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4394                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4395                 </fields>
4396                 <links>
4397                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4398                 </links>
4399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4400                         <actions>
4401                                 <retrieve/>
4402                         </actions>
4403                 </permacrud>
4404         </class>
4405
4406         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4407                 oils_persist:tablename="config.display_field_map"
4408                 oils_obj:fieldmapper="config::display_field_map"
4409                 oils_persist:field_safe="true"
4410                 reporter:label="Display Field Map">
4411                 <fields oils_persist:primary="name">
4412                         <field name="name" reporter:datatype="text"/>
4413                         <field name="field" reporter:datatype="link"/>
4414                         <field name="multi" reporter:datatype="bool"/>
4415                 </fields>
4416                 <links>
4417                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4418                 </links>
4419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4420                         <actions>
4421                                 <retrieve/>
4422                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4423                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4424                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4425                         </actions>
4426                 </permacrud>
4427         </class>
4428
4429         <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">
4430                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4431                         <field name="id" reporter:datatype="id" />
4432                         <field name="field" reporter:datatype="link"/>
4433                         <field name="source" reporter:datatype="link"/>
4434                         <field name="value"  reporter:datatype="text"/>
4435                 </fields>
4436                 <links>
4437                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4438                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4439                 </links>
4440         </class>
4441         <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">
4442                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4443                         <field name="id" reporter:datatype="id" />
4444                         <field name="value" reporter:datatype="text"/>
4445                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4446                 </fields>
4447                 <links>
4448                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4449                 </links>
4450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4451                         <actions>
4452                                 <retrieve/>
4453                         </actions>
4454                 </permacrud>
4455         </class>
4456         <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">
4457                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4458                         <field name="id" reporter:datatype="id" />
4459                         <field name="entry" reporter:datatype="link"/>
4460                         <field name="def" reporter:datatype="link"/>
4461                         <field name="source" reporter:datatype="link"/>
4462                 </fields>
4463                 <links>
4464                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4465                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4466                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4467                 </links>
4468         </class>
4469         <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">
4470                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4471                         <field name="id" reporter:datatype="id" />
4472                         <field name="entry" reporter:datatype="link"/>
4473                         <field name="simple_heading" reporter:datatype="link"/>
4474                 </fields>
4475                 <links>
4476                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4477                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4478                 </links>
4479         </class>
4480         <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">
4481                 <oils_persist:source_definition><![CDATA[
4482                         SELECT * FROM metabib.author_field_entry
4483                                                 UNION ALL
4484                         SELECT * FROM metabib.keyword_field_entry
4485                                                 UNION ALL
4486                         SELECT * FROM metabib.identifier_field_entry
4487                                                 UNION ALL
4488                         SELECT * FROM metabib.title_field_entry
4489                                                 UNION ALL
4490                         SELECT * FROM metabib.subject_field_entry
4491                                                 UNION ALL
4492                         SELECT * FROM metabib.series_field_entry
4493                 ]]></oils_persist:source_definition>
4494                 <fields>
4495                         <field name="field" reporter:datatype="link"/>
4496                         <field name="id" reporter:datatype="id" />
4497                         <field name="source" reporter:datatype="link"/>
4498                         <field name="value"  reporter:datatype="text"/>
4499                 </fields>
4500                 <links>
4501                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4502                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4503                 </links>
4504         </class>
4505         <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">
4506                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4507                         <field name="field" reporter:datatype="link"/>
4508                         <field name="id" reporter:datatype="id" />
4509                         <field name="source" reporter:datatype="link"/>
4510                         <field name="value"  reporter:datatype="text"/>
4511                 </fields>
4512                 <links>
4513                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4514                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4515                 </links>
4516         </class>
4517         <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">
4518                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4519                         <field name="accepting_usr" reporter:datatype="link"/>
4520                         <field name="amount" reporter:datatype="money" />
4521                         <field name="amount_collected" reporter:datatype="money" />
4522                         <field name="cash_drawer" reporter:datatype="link"/>
4523                         <field name="id" reporter:datatype="id" />
4524                         <field name="note"  reporter:datatype="text"/>
4525                         <field name="payment_ts" reporter:datatype="timestamp"/>
4526                         <field name="xact" reporter:datatype="link"/>
4527                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4528                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4529                 </fields>
4530                 <links>
4531                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4532                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4533                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4534                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4535                 </links>
4536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4537             <actions>
4538                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4539                     <context link="xact" jump="usr" field="home_ou"/>
4540                 </retrieve>
4541                         </actions>
4542                 </permacrud>
4543         </class>
4544         <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">
4545                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4546                         <field name="accepting_usr" reporter:datatype="link"/>
4547                         <field name="amount" reporter:datatype="money" />
4548                         <field name="amount_collected" reporter:datatype="money" />
4549                         <field name="id" reporter:datatype="id" />
4550                         <field name="note"  reporter:datatype="text"/>
4551                         <field name="payment_ts" reporter:datatype="timestamp"/>
4552                         <field name="xact" reporter:datatype="link"/>
4553                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4554                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4555                 </fields>
4556                 <links>
4557                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4558                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4559                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4560                 </links>
4561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4562             <actions>
4563                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4564                     <context link="xact" jump="usr" field="home_ou"/>
4565                 </retrieve>
4566                         </actions>
4567                 </permacrud>
4568         </class>
4569         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4570                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4571                         <field name="accepting_usr" reporter:datatype="link"/>
4572                         <field name="amount" reporter:datatype="money" />
4573                         <field name="amount_collected" reporter:datatype="money" />
4574                         <field name="id" reporter:datatype="id" />
4575                         <field name="note"  reporter:datatype="text"/>
4576                         <field name="payment_ts" reporter:datatype="timestamp"/>
4577                         <field name="xact" reporter:datatype="link"/>
4578                         <field name="billing" reporter:datatype="link"/>
4579                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4580                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4581                 </fields>
4582                 <links>
4583                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4584                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4585                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4586                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4587                 </links>
4588         </class>
4589         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4590                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4591                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4592                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4593                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4594                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4595                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4596                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4597                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4598                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4599                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4600                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4601                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4602                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4603                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4604                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4605                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4606                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4607                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4608                 </fields>
4609                 <links>
4610                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4611                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4612                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4613                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4614                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4615                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4616                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4617                 </links>
4618         </class>
4619
4620         <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">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4622                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4623                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4624                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4625                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4626                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4627                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4628                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4629                 </fields>
4630                 <links/>
4631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4632             <actions>
4633                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4634                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4635                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4636                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4637             </actions>
4638         </permacrud>
4639         </class>
4640         <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">
4641                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4642                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4643                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4644                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4645                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4646                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4647                 </fields>
4648                 <links>
4649                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4650                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4651                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4652         </links>
4653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4654             <actions>
4655                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4656                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4657                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4658                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4659             </actions>
4660         </permacrud>
4661         </class>
4662         <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">
4663                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4664                         <field name="holdable" reporter:datatype="bool" reporter:label="Holdable"/>
4665                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4666                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
4667                         <field name="opac_visible" reporter:datatype="bool" reporter:label="OPAC Visible"/>
4668             <field name="copy_active" reporter:datatype="bool" reporter:label="Sets Item Active"/>
4669             <field name="restrict_copy_delete" reporter:datatype="bool" reporter:label="Restrict Deletion"/>
4670             <field name="is_available" reporter:datatype="bool" reporter:label="Available"/>
4671             <field name="hopeless_prone" reporter:datatype="bool" reporter:label="Prone to Hopeless Holds?"/>
4672                 </fields>
4673                 <links/>
4674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4675             <actions>
4676                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4677                 <retrieve/>
4678                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4679                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4680             </actions>
4681         </permacrud>
4682         </class>
4683         <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">
4684                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
4685                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4686                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4687                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4688                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4689                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4690                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4691                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4692                         <field name="usr_message" reporter:datatype="link" reporter:label="User Message"/>
4693                 </fields>
4694                 <links>
4695                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4696                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4697                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4698                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4699                         <link field="usr_message" reltype="has_a" key="id" map="" class="aum"/>
4700                 </links>
4701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4702                         <actions>
4703                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4704                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4705                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4706                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4707                         </actions>
4708                 </permacrud>
4709         </class>
4710         <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">
4711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4712                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4713                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4714                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4715                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4716                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4717                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4718                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4719                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4720                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4721                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4722                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4723                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4724                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4725                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4726                 </fields>
4727                 <links>
4728                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4729                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4730                 </links>
4731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4732                         <actions>
4733                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4734                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4735                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4736                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4737                         </actions>
4738                 </permacrud>
4739         </class>
4740         <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">
4741                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4742                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4743                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4744                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4745                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4746                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4747                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4748                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4749                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4750                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4751                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4752                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4753                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4754                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4755                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4756                 </fields>
4757                 <links>
4758                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4759                 </links>
4760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4761                         <actions>
4762                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4763                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4764                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4765                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4766                         </actions>
4767                 </permacrud>
4768         </class>
4769
4770
4771         <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">
4772                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4773                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4774                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4775                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4776                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4777                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4778                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4779                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4780                 </fields>
4781                 <links>
4782                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4783                 </links>
4784         </class>
4785
4786         <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">
4787                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4788                         <field name="call_number" />
4789                         <field name="create_date" reporter:datatype="timestamp"/>
4790                         <field name="creator" reporter:datatype="link"/>
4791                         <field name="id" reporter:datatype="id" />
4792                         <field name="pub" reporter:datatype="bool"/>
4793                         <field name="title"  reporter:datatype="text"/>
4794                         <field name="value"  reporter:datatype="text"/>
4795                 </fields>
4796                 <links>
4797                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4798                 </links>
4799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4800             <actions>
4801                 <create permission="CREATE_VOLUME_NOTE">
4802                     <context link="call_number" field="owning_lib"/>
4803                 </create>
4804                 <retrieve permission="VIEW_VOLUME_NOTES">
4805                     <context link="call_number" field="owning_lib"/>
4806                 </retrieve>
4807                 <update permission="UPDATE_VOLUME_NOTE">
4808                     <context link="call_number" field="owning_lib"/>
4809                 </update>
4810                 <delete permission="DELETE_VOLUME_NOTE">
4811                     <context link="call_number" field="owning_lib"/>
4812                 </delete>
4813             </actions>
4814         </permacrud>
4815         </class>
4816         <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">
4817                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4818                         <field name="create_date" reporter:datatype="timestamp"/>
4819                         <field name="creator" reporter:datatype="link"/>
4820                         <field name="edit_date" reporter:datatype="timestamp"/>
4821                         <field name="editor" reporter:datatype="link"/>
4822                         <field name="id" reporter:datatype="id" />
4823                         <field name="record" reporter:datatype="link"/>
4824                         <field name="value" reporter:datatype="text"/>
4825                 </fields>
4826                 <links>
4827                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4828                 </links>
4829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4830             <actions>
4831                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4832                 <retrieve/>
4833                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4834                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4835             </actions>
4836         </permacrud>
4837         </class>
4838         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4839         <oils_persist:source_definition><![CDATA[
4840 SELECT  usr,
4841         SUM(
4842             CASE
4843                 WHEN (
4844                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4845                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4846                 ) THEN 1
4847                 ELSE 0
4848             END
4849         ) AS out,
4850
4851         SUM(
4852             CASE
4853                 WHEN (
4854                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4855                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4856                 ) THEN 1
4857                 ELSE 0
4858             END
4859         ) AS overdue,
4860
4861         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4862         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4863         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4864   FROM  action.circulation
4865   WHERE checkin_time IS NULL
4866   GROUP BY 1
4867         ]]></oils_persist:source_definition>
4868         <fields oils_persist:primary="usr">
4869             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4870             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4871             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4872             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4873             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4874             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4875         </fields>
4876         <links>
4877             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4878         </links>
4879         </class>
4880         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4881         <oils_persist:source_definition><![CDATA[
4882 SELECT  usr,
4883         STRING_AGG(
4884             CASE
4885                 WHEN (
4886                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4887                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4888                 ) THEN id::TEXT
4889                 ELSE '0'
4890             END
4891         ,',') AS out,
4892
4893         STRING_AGG(
4894             CASE
4895                 WHEN (
4896                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4897                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4898                 ) THEN id::TEXT
4899                 ELSE '0'
4900             END
4901         ,',') AS overdue,
4902
4903         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4904         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4905         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4906   FROM  action.circulation
4907   WHERE checkin_time IS NULL
4908   GROUP BY 1
4909         ]]></oils_persist:source_definition>
4910         <fields oils_persist:primary="usr">
4911             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4912             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4913             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4914             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4915             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4916             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4917         </fields>
4918         <links>
4919             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4920         </links>
4921         </class>
4922         <class id="acsp" controller="open-ils.cstore" oils_obj:fieldmapper="action::curbside" oils_persist:tablename="action.curbside" reporter:label="Curbside Appointment Slot">
4923                 <fields oils_persist:primary="id" oils_persist:sequence="action.curbside_id_seq">
4924                         <field reporter:label="Appointment ID" name="id" reporter:datatype="id" />
4925                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4926                         <field reporter:label="Pickup Library" name="org" reporter:datatype="org_unit"/>
4927                         <field reporter:label="Appointment Date/Time" name="slot" reporter:datatype="timestamp"/>
4928                         <field reporter:label="Staged" name="staged" reporter:datatype="timestamp"/>
4929                         <field reporter:label="Staging Staff" name="stage_staff" reporter:datatype="link"/>
4930                         <field reporter:label="Arrival Date/Time" name="arrival" reporter:datatype="timestamp"/>
4931                         <field reporter:label="Delivery Date/Time" name="delivered" reporter:datatype="timestamp"/>
4932                         <field reporter:label="Delivery Staff" name="delivery_staff" reporter:datatype="link"/>
4933                         <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
4934                 </fields>
4935                 <links>
4936                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4937                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4938                         <link field="stage_staff" reltype="has_a" key="id" map="" class="au"/>
4939                         <link field="delivery_staff" reltype="has_a" key="id" map="" class="au"/>
4940                 </links>
4941         </class>
4942         <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">
4943                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4944                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4945                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4946                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4947                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4948                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4949                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4950                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4951                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4952                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4953                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4954                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4955                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4956                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4957                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4958                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4959                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4960                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4961                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4962                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4963                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4964                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4965                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4966                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4967                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4968                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4969                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4970                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4971                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4972                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4973                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4974                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4975                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4976                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4977                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4978                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4979                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4980                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4981                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4982                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4983                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4984                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4985                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4986                 </fields>
4987                 <links>
4988                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4989                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4990                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4991                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4992                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4993                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4994                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4995                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4996                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4997                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4998                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4999                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5000                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5001                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5002                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5003                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5004                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5005                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
5006                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5007                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5008                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5009                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5010                 </links>
5011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5012                         <actions>
5013                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5014                         </actions>
5015                 </permacrud>
5016         </class>
5017         <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">
5018                 <fields>
5019                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5020                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5021                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
5022                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5023                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
5024                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5025                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
5026                 </fields>
5027                 <links>
5028                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5029                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5030                 </links>
5031                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5032                         <actions>
5033                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5034                         </actions>
5035                 </permacrud>
5036         </class>
5037         <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">
5038                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5039                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5040                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5041                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5042                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5043                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5044                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5045                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5046                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5047                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5048                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5049                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5050                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5051                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5052                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5053                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5054                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5055                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5056                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5057                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5058                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5059                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5060                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5061                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5062                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5063                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5064                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5065                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5066                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5067                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5068                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5069                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5070                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5071                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5072                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5073                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5074                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5075                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5076                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5077                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5078                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5079                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5080                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5081                 </fields>
5082                 <links>
5083                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5084                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5085                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5086                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5087                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5088                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5089                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5090                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5091                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5092                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5093                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5094                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5095                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5096                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5097                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5098                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5099                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5100                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5101                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5102                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5103                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5104                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5105                 </links>
5106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5107                         <actions>
5108                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5109                         </actions>
5110                 </permacrud>
5111         </class>
5112
5113         <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">
5114                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5115                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5116                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5117                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5118                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5119                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5120                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5121                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5122                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5123                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5124                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5125                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5126                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5127                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5128                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5129                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5130                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5131                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5132                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5133                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5134                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5135                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5136                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5137                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5138                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5139                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5140                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5141                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5142                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5144                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5145                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5146                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5147                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5148                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5149                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5150                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5151                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5152                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5153                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5154                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5155                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5156                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5157                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5158                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5159                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5160                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5161                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5162                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5163                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5164                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5165                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5166                 </fields>
5167                 <links>
5168                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5169                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5170                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5171                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5172                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5173                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5174                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5175                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5176                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5177                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5178                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5179                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5180                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5181                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5182                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5183                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5184                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5186                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5187                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5188                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5189                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5190                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5191                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5192                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5193                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5194                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5195                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5196                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5197                 </links>
5198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5199                         <actions>
5200                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5201                         </actions>
5202                 </permacrud>
5203         </class>
5204         <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">
5205                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5206                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5207                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5208                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5209                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5210                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5211                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5212                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5213                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5214                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5215                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5216                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5217                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5218                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5219                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5220                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5221                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5222                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5223                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5224                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5225                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5226                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5227                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5228                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5229                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5230                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5231                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5232                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5233                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5234                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5235                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5236                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5237                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5238                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5239                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5240                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5241                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5242                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5243                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5244                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5245                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5246                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5247                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5248                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5249                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5250                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5251                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5252                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5253                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5254                 </fields>
5255                 <links>
5256                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5257                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5258                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5259                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5260                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5261                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5262                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5263                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5264                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5265                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5266                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5267                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5268                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5269                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5270                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5271                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5272                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5273                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5274                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5275                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5276                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5277                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
5278                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5279                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5280                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5281                 </links>
5282         </class>
5283         <class id="auch" 
5284                 controller="open-ils.cstore" 
5285                 oils_obj:fieldmapper="action::user_circ_history" 
5286                 oils_persist:tablename="action.usr_circ_history" 
5287                 reporter:label="User Checkout History">
5288                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
5289                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5290                         <!-- prevent reporting on the user that owns the checkout history -->
5291                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
5292                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5293                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
5294                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
5295                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
5296                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
5297                 </fields>
5298                 <links>
5299                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5300                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5301                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
5302                 </links>
5303         </class>
5304         <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">
5305                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
5306                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5307                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5308                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5309                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5310                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5311                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5312                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5313                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5314                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5315                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5316                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5319                 </fields>
5320                 <links>
5321                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5322                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5323                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5324                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5325                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5326                 </links>
5327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5328                         <actions>
5329                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5330                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5331                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5332                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5333                         </actions>
5334                 </permacrud>
5335         </class>
5336
5337         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5338                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5339                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5340                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5341                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5342                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5343                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5344                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5345                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5346                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5347                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5348                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5349                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5350                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5351                 </fields>
5352                 <links>
5353                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5354                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5355                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5356                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5357                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5358                 </links>
5359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5360                         <actions>
5361                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5362                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5363                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5364                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5365                         </actions>
5366                 </permacrud>
5367         </class>
5368         
5369         <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">
5370                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5371                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5372                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5373                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5374                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5375                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5376                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5377                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5378                 </fields>
5379                 <links>
5380                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5381                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5382                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5383                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5384                 </links>
5385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5386                         <actions>
5387                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5388                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5389                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5390                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5391                         </actions>
5392                 </permacrud>
5393         </class>
5394         
5395         <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">
5396                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5397                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5398                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5399                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5400                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5401                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5402                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5403                 </fields>
5404                 <links>
5405                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5406                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5407                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5408                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5409                 </links>
5410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5411                         <actions>
5412                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5413                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5414                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5415                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5416                         </actions>
5417                 </permacrud>
5418         </class>
5419         
5420         <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">
5421                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5422                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5423                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5424                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5425                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5426                 </fields>
5427                 <links>
5428                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5429                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5430                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5431                 </links>
5432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5433                         <actions>
5434                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5435                     <context link="resource" field="owner" />
5436                 </create>
5437                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5438                     <context link="resource" field="owner" />
5439                 </retrieve>
5440                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5441                     <context link="resource" field="owner" />
5442                 </update>
5443                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5444                     <context link="resource" field="owner" />
5445                 </delete>
5446                         </actions>
5447                 </permacrud>
5448         </class>
5449         
5450         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5451                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5452                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5453                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5454                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5455                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5456                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5457                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5458                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5459                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5460                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5461                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5462                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5463                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5464                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5465                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5466                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5467                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5468                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5469                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5470                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5471                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5472                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5473                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5474                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5475                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5476                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5477                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5478                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5479                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5480                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5481                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5482                 </fields>
5483                 <links>
5484                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5485                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5486                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5487                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5488                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5489                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5490                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5491                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5492                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5493                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5494                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5495                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5496                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5497                 </links>
5498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5499                         <actions>
5500                                 <create permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5501                                 <retrieve permission="VIEW_BOOKING_RESERVATION" context_field="pickup_lib"/>
5502                                 <update permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5503                                 <delete permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5504                         </actions>
5505                 </permacrud>
5506         </class>
5507         
5508         <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">
5509                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5510                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5511                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5512                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5513                 </fields>
5514                 <links>
5515                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5516                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5517                 </links>
5518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5519                         <actions>
5520                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5521                                         <context link="reservation" field="pickup_lib"/>
5522                                 </create>
5523                                 <retrieve permission="VIEW_BOOKING_RESERVATION_ATTR_MAP">
5524                                         <context link="reservation" field="pickup_lib"/>
5525                                 </retrieve>
5526                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5527                                         <context link="reservation" field="pickup_lib"/>
5528                                 </update>
5529                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5530                                         <context link="reservation" field="pickup_lib"/>
5531                                 </delete>
5532                         </actions>
5533                 </permacrud>
5534         </class>
5535
5536         <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">
5537                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5538                         <field name="bucket" reporter:datatype="link"/>
5539                         <field name="id" reporter:datatype="id" />
5540                         <field name="target_call_number" reporter:datatype="link" />
5541                         <field name="create_time" reporter:datatype="timestamp" />
5542                         <field name="pos" reporter:datatype="int" />
5543                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5544                 </fields>
5545                 <links>
5546                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5547                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5548             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5549                 </links>
5550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5551                         <actions>
5552                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5553                     <context link="bucket" owning_lib="owning_lib"/>
5554                 </retrieve>
5555             </actions>
5556         </permacrud>
5557         </class>
5558         <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">
5559                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5560                         <field name="id" reporter:datatype="id" />
5561                         <field name="item" reporter:datatype="link"/>
5562                         <field name="note" reporter:datatype="text" />
5563                 </fields>
5564                 <links>
5565                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5566                 </links>
5567         </class>
5568         <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">
5569                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5570                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5571                         <field name="btype" reporter:datatype="text"/>
5572                         <field name="id" reporter:datatype="id" />
5573                         <field name="name" reporter:datatype="text"/>
5574                         <field name="description" reporter:datatype="text"/>
5575                         <field name="owner" reporter:datatype="link"/>
5576                         <field name="pub" reporter:datatype="bool"/>
5577                         <field name="create_time" reporter:datatype="timestamp" />
5578                         <field name="owning_lib" reporter:datatype="org_unit" />
5579                 </fields>
5580                 <links>
5581                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5582                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5583                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5584                 </links>
5585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5586                         <actions>
5587                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5588                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5589                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5590                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5591                         </actions>
5592                 </permacrud>
5593         </class>
5594         <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">
5595                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5596                         <field name="id" reporter:datatype="id" />
5597                         <field name="bucket" reporter:datatype="link"/>
5598                         <field name="note" reporter:datatype="text" />
5599                 </fields>
5600                 <links>
5601                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5602                 </links>
5603         </class>
5604         <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">
5605                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5606                         <field name="hold" reporter:datatype="link"/>
5607                         <field name="id" reporter:datatype="id" />
5608                         <field name="target_copy" reporter:datatype="link"/>
5609                         <field name="proximity" reporter:datatype="number"/>
5610                 </fields>
5611                 <links>
5612                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5613                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5614                 </links>
5615         </class>
5616         <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">
5617                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5618                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5619                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5620                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5621                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5622                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5623                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5624                 </fields>
5625                 <links>
5626                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5627                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5628                 </links>
5629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5630             <actions>
5631                 <create permission="CREATE_HOLD_NOTIFICATION">
5632                                         <context link="hold" jump="usr" field="home_ou" />
5633                                 </create>
5634                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5635                                         <context link="hold" jump="usr" field="home_ou" />
5636                                 </retrieve>
5637                 <update permission="CREATE_HOLD_NOTIFICATION">
5638                                         <context link="hold" jump="usr" field="home_ou" />
5639                                 </update>
5640                 <delete permission="CREATE_HOLD_NOTIFICATION">
5641                                         <context link="hold" jump="usr" field="home_ou" />
5642                                 </delete>
5643             </actions>
5644         </permacrud>
5645         </class>
5646         <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">
5647                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5648                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5649                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5650                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5651                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5652                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5653                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5654                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5655                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5656                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5657                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5658                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5659                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5660                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5661                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5662                 </fields>
5663                 <links>
5664                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5665                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5666                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5667                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5668                 </links>
5669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5670             <actions>
5671                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5672                 <retrieve/>
5673                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5674                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5675             </actions>
5676         </permacrud>
5677         </class>
5678         <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">
5679                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5680                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5681                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5682                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5683                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" />
5684             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5685             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5686             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5687                 </fields>
5688                 <links>
5689                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5690                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5691                 </links>
5692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5693             <actions>
5694                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5695                 <retrieve/>
5696                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5697                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5698             </actions>
5699         </permacrud>
5700         </class>
5701         <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">
5702                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5703                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5704             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5705             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5706                 </fields>
5707                 <links>
5708                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5709                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5710                 </links>
5711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5712             <actions>
5713                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5714                                         <context link="lgroup" field="owner" />
5715                 </create>
5716                 <retrieve/>
5717                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5718                                         <context link="lgroup" field="owner" />
5719                 </update>
5720                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5721                                         <context link="lgroup" field="owner" />
5722                 </delete>
5723             </actions>
5724         </permacrud>
5725         </class>
5726
5727     <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">
5728         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5729             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5730             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5731             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5732             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5733         </fields>
5734         <links>
5735             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5736             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5737         </links>
5738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5739             <actions>
5740                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5741                 <retrieve/>
5742                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5743                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5744             </actions>
5745         </permacrud>
5746     </class>
5747
5748         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5749                 <fields>
5750                         <field name="sre_id" oils_persist:virtual="true" />
5751                         <field name="location" oils_persist:virtual="true" />
5752                         <field name="owning_lib" oils_persist:virtual="true" />
5753                         <field name="basic_holdings" oils_persist:virtual="true" />
5754                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5755                         <field name="supplement_holdings" oils_persist:virtual="true" />
5756                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5757                         <field name="index_holdings" oils_persist:virtual="true" />
5758                         <field name="index_holdings_add" oils_persist:virtual="true" />
5759                         <field name="online" oils_persist:virtual="true" />
5760                         <field name="missing" oils_persist:virtual="true" />
5761                         <field name="incomplete" oils_persist:virtual="true" />
5762                 </fields>
5763         </class>
5764
5765         <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">
5766                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5767                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5768                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5769                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5770                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5771                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5772                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5773                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5774                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5775                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5776                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5777                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5778                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5779                 </fields>
5780                 <links>
5781                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5782                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5783                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5784                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5785                 </links>
5786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5787                         <actions>
5788                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5789                                 <retrieve/>
5790                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5791                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5792                         </actions>
5793                 </permacrud>
5794         </class>
5795
5796         <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">
5797                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5798                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5799                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5800                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5801                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5802                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5803                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5804                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5805                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5806                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5807                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5808                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5809                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5810                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5811                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5812                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5813                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5814                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5815                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5816                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5817                 </fields>
5818                 <links>
5819                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5820                 </links>
5821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5822                         <actions>
5823                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5824                                         <context link="subscription" field="owning_lib" />
5825                                 </create>
5826                                 <retrieve />
5827                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5828                                         <context link="subscription" field="owning_lib" />
5829                                 </update>
5830                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5831                                         <context link="subscription" field="owning_lib" />
5832                                 </delete>
5833                         </actions>
5834                 </permacrud>
5835         </class>
5836
5837         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5838                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5839                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5840                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5841                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5842                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5843                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5844                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5845                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5846                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5847                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5848                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5849                 </fields>
5850                 <links>
5851                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5852                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5853                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5854                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5855                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5856                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5857                 </links>
5858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5859                         <actions>
5860                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5861                                 <retrieve />
5862                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5863                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5864                         </actions>
5865                 </permacrud>
5866         </class>
5867
5868         <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">
5869                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5871                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5872                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5873                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5874                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5875                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5876                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5877                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5878                 </fields>
5879                 <links>
5880                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5881                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5882                 </links>
5883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5884                         <actions>
5885                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5886                     <context link="subscription" field="owning_lib"/>
5887                 </create>
5888                                 <retrieve />
5889                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5890                     <context link="subscription" field="owning_lib"/>
5891                 </update>
5892                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5893                     <context link="subscription" field="owning_lib"/>
5894                 </delete>
5895                         </actions>
5896                 </permacrud>
5897         </class>
5898
5899         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5900                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5901                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5902                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5903                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5904                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5905                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5906                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5907                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5908                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5909                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5910                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5911                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5912                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5913                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5914                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5915                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5916                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5917                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5918                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5919                 </fields>
5920                 <links>
5921                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5922                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5923                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5924                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5925                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5926                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5927                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5928                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5929                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5930                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5931                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5932                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5933                 </links>
5934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5935                         <actions>
5936                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5937                                 <retrieve />
5938                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5939                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5940                         </actions>
5941                 </permacrud>
5942         </class>
5943
5944         <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">
5945                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5946                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5947                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5948                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5949                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5950                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5951                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5952                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5953                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5954                 </fields>
5955                 <links>
5956                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5957                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5958                 </links>
5959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5960                         <actions>
5961                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5962                                         <context link="distribution" field="holding_lib" />
5963                                 </create>
5964                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5965                                         <context link="distribution" field="holding_lib" />
5966                                 </retrieve>
5967                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5968                                         <context link="distribution" field="holding_lib" />
5969                                 </update>
5970                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5971                                         <context link="distribution" field="holding_lib" />
5972                                 </delete>
5973                         </actions>
5974                 </permacrud>
5975         </class>
5976
5977         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5978                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5979                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5980                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5981                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5982                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5983                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5984                 </fields>
5985                 <links>
5986                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5987                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5988                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5989                 </links>
5990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5991                         <actions>
5992                                 <create permission="ADMIN_SERIAL_STREAM">
5993                                         <context link="distribution" field="holding_lib" />
5994                                 </create>
5995                                 <retrieve />
5996                                 <update permission="ADMIN_SERIAL_STREAM">
5997                                         <context link="distribution" field="holding_lib" />
5998                                 </update>
5999                                 <delete permission="ADMIN_SERIAL_STREAM">
6000                                         <context link="distribution" field="holding_lib" />
6001                                 </delete>
6002                         </actions>
6003                 </permacrud>
6004         </class>
6005
6006         <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">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
6008                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6009                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6010                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
6011                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
6012                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
6013                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6014                 </fields>
6015                 <links>
6016                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6017                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
6018                 </links>
6019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6020                         <actions>
6021                                 <create permission="ADMIN_SERIAL_STREAM">
6022                                         <context link="stream" jump="distribution" field="holding_lib" />
6023                                 </create>
6024                                 <retrieve permission="RECEIVE_SERIAL">
6025                                         <context link="stream" jump="distribution" field="holding_lib" />
6026                                 </retrieve>
6027                                 <update permission="ADMIN_SERIAL_STREAM">
6028                                         <context link="stream" jump="distribution" field="holding_lib" />
6029                                 </update>
6030                                 <delete permission="ADMIN_SERIAL_STREAM">
6031                                         <context link="stream" jump="distribution" field="holding_lib" />
6032                                 </delete>
6033                         </actions>
6034                 </permacrud>
6035         </class>
6036
6037         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
6038                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
6039                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6040                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6041                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6042                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6043                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6044                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6045                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
6046                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6047                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
6048                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
6049                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
6050                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
6051                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6052                 </fields>
6053                 <links>
6054                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6055                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6056                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6057                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
6058                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
6059                 </links>
6060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6061                         <actions>
6062                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
6063                                         <context link="subscription" field="owning_lib" />
6064                                 </create>
6065                                 <retrieve/>
6066                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
6067                                         <context link="subscription" field="owning_lib" />
6068                                 </update>
6069                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
6070                                         <context link="subscription" field="owning_lib" />
6071                                 </delete>
6072                         </actions>
6073                 </permacrud>
6074         </class>
6075
6076         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6078                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6079                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6080                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6081                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6082                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6083                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6084                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6085                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6086                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6087                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6088                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6089                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6090                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6091                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6092                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6093                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6094                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6095                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6096                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6097                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6098                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6099                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6100                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6101                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6102                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6103                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6104                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6105                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6106                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6107                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6108                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6109                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6110                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6111                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
6112                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
6113                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
6114                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6115                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6116                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6117                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6118                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6119                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6120                 </fields>
6121                 <links>
6122                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6123                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6124                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6125                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6126                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6127                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6128                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6129                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6130                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6131                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6132                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6133                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6134                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6135                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6136                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6137                 </links>
6138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6139                         <actions>
6140                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6141                                 <retrieve/>
6142                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6143                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6144                         </actions>
6145                 </permacrud>
6146         </class>
6147
6148         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
6149                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
6150                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6151                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6152                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6153                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6154                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6155                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
6156                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6157                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
6158                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
6159                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
6160                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
6161                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6162                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6163                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
6164                 </fields>
6165                 <links>
6166                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6167                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6168                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6169                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6170                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
6171                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
6172                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
6173                 </links>
6174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6175                         <actions>
6176                                 <create permission="ADMIN_SERIAL_ITEM">
6177                                         <context link="stream" jump="distribution" field="holding_lib" />
6178                                 </create>
6179                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6180                                         <context link="stream" jump="distribution" field="holding_lib" />
6181                                 </retrieve>
6182                                 <update permission="ADMIN_SERIAL_ITEM">
6183                                         <context link="stream" jump="distribution" field="holding_lib" />
6184                                 </update>
6185                                 <delete permission="ADMIN_SERIAL_ITEM">
6186                                         <context link="stream" jump="distribution" field="holding_lib" />
6187                                 </delete>
6188                         </actions>
6189                 </permacrud>
6190         </class>
6191
6192         <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">
6193                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
6194                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6195                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
6196                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6197                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6198                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6199                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6200                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6201                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6202                 </fields>
6203                 <links>
6204                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6205                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6206                 </links>
6207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6208                         <actions>
6209                                 <create permission="ADMIN_SERIAL_ITEM">
6210                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6211                                 </create>
6212                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6213                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6214                                 </retrieve>
6215                                 <update permission="ADMIN_SERIAL_ITEM">
6216                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6217                                 </update>
6218                                 <delete permission="ADMIN_SERIAL_ITEM">
6219                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6220                                 </delete>
6221                         </actions>
6222                 </permacrud>
6223         </class>
6224         <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">
6225                 <fields>
6226                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
6227                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
6228                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
6229                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
6230                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
6231                 </fields>
6232                 <links>
6233                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6234                 </links>
6235         </class>
6236         <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">
6237                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
6238                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6239                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
6240                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
6241                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
6242                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
6243                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
6244                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
6245                 </fields>
6246                 <links>
6247                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6248                 </links>
6249         </class>
6250         <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">
6251                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
6252                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6253                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6254                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6255                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6256                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6257                 </fields>
6258                 <links>
6259                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6260                 </links>
6261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6262                         <actions>
6263                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6264                                         <context link="distribution" field="holding_lib" />
6265                                 </create>
6266                                 <retrieve/>
6267                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6268                                         <context link="distribution" field="holding_lib" />
6269                                 </update>
6270                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6271                                         <context link="distribution" field="holding_lib" />
6272                                 </delete>
6273                         </actions>
6274                 </permacrud>
6275         </class>
6276
6277         <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">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
6279                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6280                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6281                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6282                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6283                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6284                 </fields>
6285                 <links>
6286                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6287                 </links>
6288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6289                         <actions>
6290                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6291                                         <context link="distribution" field="holding_lib" />
6292                                 </create>
6293                                 <retrieve/>
6294                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6295                                         <context link="distribution" field="holding_lib" />
6296                                 </update>
6297                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6298                                         <context link="distribution" field="holding_lib" />
6299                                 </delete>
6300                         </actions>
6301                 </permacrud>
6302         </class>
6303
6304         <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">
6305                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
6306                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6307                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6308                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6309                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6310                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6311                 </fields>
6312                 <links>
6313                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6314                 </links>
6315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6316                         <actions>
6317                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6318                                         <context link="distribution" field="holding_lib" />
6319                                 </create>
6320                                 <retrieve/>
6321                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6322                                         <context link="distribution" field="holding_lib" />
6323                                 </update>
6324                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6325                                         <context link="distribution" field="holding_lib" />
6326                                 </delete>
6327                         </actions>
6328                 </permacrud>
6329         </class>
6330
6331         <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">
6332                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6333                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6334                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6335                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6336                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6337                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6338                 </fields>
6339                 <links>
6340                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6341                 </links>
6342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6343                         <actions>
6344                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6345                                 <retrieve/>
6346                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6347                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6348                         </actions>
6349                 </permacrud>
6350         </class>
6351
6352         <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">
6353                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6354                         <field name="id" reporter:datatype="id" />
6355                         <field name="owning_copy" reporter:datatype="link"/>
6356                         <field name="stat_cat" reporter:datatype="link"/>
6357                         <field name="stat_cat_entry" reporter:datatype="link"/>
6358                 </fields>
6359                 <links>
6360                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6361                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6362                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6363                 </links>
6364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6365                         <actions>
6366                                 <retrieve/>
6367                         </actions>
6368                 </permacrud>
6369         </class>
6370         <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">
6371                 <fields oils_persist:primary="code">
6372                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6373                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6374                 </fields>
6375                 <links/>
6376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6377             <actions>
6378                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6379                 <retrieve/>
6380                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6381                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6382             </actions>
6383         </permacrud>
6384         </class>
6385         <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">
6386                 <fields oils_persist:primary="code">
6387                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6388                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6389                 </fields>
6390                 <links/>
6391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6392             <actions>
6393                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6394                 <retrieve/>
6395                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6396                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6397             </actions>
6398         </permacrud>
6399         </class>
6400         <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">
6401                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6402                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6403                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6404                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6405                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6406                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6407                 </fields>
6408                 <links>
6409             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6410         </links>
6411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6412             <actions>
6413                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6414                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6415                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6416                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6417             </actions>
6418         </permacrud>
6419         </class>
6420         <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">
6421                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6422                         <field reporter:label="Library Group ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6423                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6424                         <field reporter:label="Global?" name="global" reporter:datatype="bool"/>
6425                         <field reporter:label="Maps" name="maps" oils_persist:virtual="true" reporter:datatype="link"/>
6426                 </fields>
6427                 <links>
6428                         <link field="maps" reltype="has_many" key="lasso" map="" class="lmap"/>
6429         </links>
6430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6431             <actions>
6432                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6433                 <retrieve/>
6434                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6435                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6436             </actions>
6437         </permacrud>
6438         </class>
6439         <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">
6440                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6441                         <field reporter:label="Library Group Map ID" name="id" reporter:datatype="id" />
6442                         <field reporter:label="Library Group" name="lasso" reporter:datatype="link"/>
6443                         <field reporter:label="Organizational Unit" name="org_unit" reporter:datatype="org_unit"/>
6444                 </fields>
6445                 <links>
6446                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6447                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6448                 </links>
6449         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6450             <actions>
6451                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6452                 <retrieve/>
6453                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6454                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6455             </actions>
6456         </permacrud>
6457         </class>
6458         <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">
6459                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6460                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6461                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6462                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6463                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6464                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6465                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6466                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6467                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6468                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6469                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6470                 </fields>
6471                 <links>
6472                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6473                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6474                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6475                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6476                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6477                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6478                 </links>
6479         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6480             <actions>
6481                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6482                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6483                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6484                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6485             </actions>
6486         </permacrud>
6487         </class>
6488         <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">
6489                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6490                         <field name="id" reporter:datatype="id" />
6491                         <field name="from_org" reporter:datatype="org_unit"/>
6492                         <field name="to_org" reporter:datatype="org_unit"/>
6493                         <field name="prox" reporter:datatype="int" />
6494                 </fields>
6495                 <links>
6496                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6497                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6498                 </links>
6499         </class>
6500         <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">
6501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6502                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6503                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6504                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6505                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6506                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6507                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6508                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6509                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6510                 </fields>
6511                 <links/>
6512         </class>
6513         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6514                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6515                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6516                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6517                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6518                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6519                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6520                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6521                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6522                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6523                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6524                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6525                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6526                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6527                 </fields>
6528                 <links>
6529                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6530                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6531                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6532                 </links>
6533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6534             <actions>
6535                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6536                 <retrieve/>
6537                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6538                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6539             </actions>
6540         </permacrud>
6541         </class>
6542         <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">
6543                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6544                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6545                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6546                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6547                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6548                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6549                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6550                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6551                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6552                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6553                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6554                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6555                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6556                         <field name="latitude" reporter:label="Latitude" reporter:datatype="float"/>
6557                         <field name="longitude" reporter:label="Longitude" reporter:datatype="float"/>
6558                 </fields>
6559                 <links>
6560                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6561                 </links>
6562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6563             <actions>
6564                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6565                 <retrieve/>
6566                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6567                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6568             </actions>
6569         </permacrud>
6570         </class>
6571         <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">
6572                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6573                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6574                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6575                         <field name="query_text" reporter:datatype="text"/>
6576                 </fields>
6577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6578             <actions>
6579                 <retrieve/>
6580             </actions>
6581         </permacrud>
6582         </class>
6583
6584         <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">
6585                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6586                         <field name="id" reporter:datatype="id" reporter:selector="label" reporter:label="ID" oils_obj:required="true"/>
6587                         <field name="owner" reporter:datatype="org_unit" reporter:label="Owning Org Unit" oils_obj:required="true"/>
6588                         <field name="code" reporter:datatype="text" reporter:label="Code" oils_obj:required="true"/>
6589                         <field name="label" reporter:datatype="text" oils_persist:i18n="true" reporter:label="Label" oils_obj:required="true"/>
6590                         <field name="create_date" reporter:datatype="timestamp" reporter:label="Create Date"/>
6591                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link" reporter:label="Group Entries"/>
6592                 </fields>
6593                 <links>
6594                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6595                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6596                 </links>
6597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6598             <actions>
6599                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6600                 <retrieve/>
6601                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6602                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6603             </actions>
6604         </permacrud>
6605         </class>
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6608                         <field name="id" reporter:datatype="id" reporter:label="ID" oils_obj:required="true"/>
6609                         <field name="grp" reporter:datatype="link" reporter:label="Search Filter Group" oils_obj:required="true"/>
6610                         <field name="pos" reporter:datatype="int" reporter:label="Position" oils_obj:required="true"/>
6611                         <field name="query" reporter:datatype="link" reporter:label="Query" oils_obj:required="true"/>
6612                 </fields>
6613                 <links>
6614                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6615                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6616                 </links>
6617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6618             <actions>
6619                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6620                     <context link="grp" field="owner"/>
6621                 </create>
6622                 <retrieve/>
6623                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6624                     <context link="grp" field="owner"/>
6625                 </update>
6626                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6627                     <context link="grp" field="owner"/>
6628                 </delete>
6629             </actions>
6630         </permacrud>
6631         </class>
6632
6633         <!-- A note: Please update alhr and ahopl when updating ahr -->
6634         <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">
6635                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6636                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6637                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6638                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6639                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6640                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6641                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6642                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6643                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6644                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6646                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6647                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6648                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6649                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6650                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6651                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6652                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6653                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6654                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6655                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6656                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6657                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6658                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6659                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6660                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6661                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6662                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6663                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6664                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6665                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6666                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6667                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6668                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6669                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6670                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6671                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6672                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6673                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6674                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6675                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6676                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6677                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6678                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6679                 </fields>
6680                 <links>
6681                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6682                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6683                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6684                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6685                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6686                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6687                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6688                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6689                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6690                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6691                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6692                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6693                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6694                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6695                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6696                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6697                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6698                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6699                 </links>
6700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6701                         <actions>
6702                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6703                         </actions>
6704                 </permacrud>
6705         </class>
6706         <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">
6707                 <oils_persist:source_definition><![CDATA[
6708                 SELECT
6709                         ahr.*,
6710                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6711                                 copy_location_order_position,
6712                         CASE WHEN au.alias IS NOT NULL THEN
6713                                 au.alias
6714                         ELSE
6715                                 au.first_given_name
6716                         END AS usr_alias_or_first_given_name,
6717                         au.first_given_name AS usr_first_given_name,
6718                         au.second_given_name AS usr_second_given_name,
6719                         au.family_name AS usr_family_name,
6720                         au.prefix AS usr_prefix,
6721                         au.suffix AS usr_suffix,
6722                         au.alias AS usr_alias,
6723                         CASE WHEN au.alias IS NOT NULL THEN
6724                                 au.alias
6725                         ELSE
6726                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6727                                         COALESCE(au.family_name, ''),
6728                                         COALESCE(au.suffix, ''),
6729                                         ', ',
6730                                         COALESCE(au.prefix, ''),
6731                                         COALESCE(au.first_given_name, ''),
6732                                         COALESCE(au.second_given_name, '')
6733                                 ], ' '), E'\\s+,', ',')
6734                         END AS usr_alias_or_display_name,
6735                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6736                                 COALESCE(au.family_name, ''),
6737                                 COALESCE(au.suffix, ''),
6738                                 ', ',
6739                                 COALESCE(au.prefix, ''),
6740                                 COALESCE(au.first_given_name, ''),
6741                                 COALESCE(au.second_given_name, '')
6742                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6743                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6744                                 AS call_number_label,
6745                         siss.label AS issuance_label,
6746                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6747                         ahcm_1.copy_count AS potential_copies
6748                 FROM action.hold_request ahr
6749                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6750                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6751                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6752                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6753                 JOIN actor.usr au ON (au.id = ahr.usr)
6754                 JOIN (
6755                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6756                         FROM asset.copy_location
6757                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6758                 LEFT JOIN actor.usr_standing_penalty ausp 
6759                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6760                 LEFT JOIN config.standing_penalty csp
6761                         ON (
6762                                 csp.id = ausp.standing_penalty AND 
6763                                 csp.block_list LIKE '%CAPTURE%' AND (
6764                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6765                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6766                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6767                                         )
6768                                 )
6769                         )
6770                 JOIN (
6771                         SELECT COUNT(target_copy) AS copy_count, hold
6772                         FROM action.hold_copy_map
6773                         GROUP BY 2
6774                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6775                 LEFT JOIN serial.issuance siss
6776                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6777                 LEFT JOIN asset.copy_location_order acplo
6778                         ON (acp.location = acplo.location AND
6779                                 acp.circ_lib = acplo.org)
6780                 WHERE
6781                         ahr.capture_time IS NULL AND
6782                         ahr.cancel_time IS NULL AND
6783                         csp.id IS NULL AND
6784                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6785                         acp.status IN (0,7)
6786                 ]]></oils_persist:source_definition>
6787                 <fields oils_persist:primary="id">
6788                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6789                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6790                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6791                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6792                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6793                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6794                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6795                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6796                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6797                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6798                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6799                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6800                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6801                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6802                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6803                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6804                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6805                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6806                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6807                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6808                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6809                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6810                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6811                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6812                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6813                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6814                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6815                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6816                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6817                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6818                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6819                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6820                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6821                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6822                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6823                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6824                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6825                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6826                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6827                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6828                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6829                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6830                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6831                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6832                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6833                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6834                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6835                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6836                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6837                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6838                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6839                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6840                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6841                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6842                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6843                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6844                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6845                 </fields>
6846                 <links>
6847                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6848                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6849                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6850                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6851                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6852                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6853                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6854                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6855                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6856                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6857                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6858                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6859                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6860                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6861                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6862                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6863                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6864                 </links>
6865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6866                         <actions>
6867                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6868                         </actions>
6869                 </permacrud>
6870         </class>
6871         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6872                 <oils_persist:source_definition><![CDATA[
6873                         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)
6874                 ]]></oils_persist:source_definition>
6875                 <fields oils_persist:primary="id">
6876                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6877                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6878                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6879                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6880                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6881                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6882                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6883                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6884                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6885                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6886                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6887                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6888                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6889                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6890                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6891                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6892                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6893                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6894                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6895                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6896                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6897                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6898                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6899                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6900                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6901                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6902                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6903                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6904                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6905                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6906                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6907                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6908                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6909                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6910                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6911                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6912                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6913                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6914                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6915                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6916                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6917                 </fields>
6918                 <links>
6919                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6920                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6921                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6922                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6923                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6924                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6925                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6926                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6927                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6928                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6929                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6930                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6931                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6932                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6933                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6934                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6935                 </links>
6936         </class>
6937
6938         <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">
6939                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6940                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6941                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6942                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6943                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6944                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6945                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6946                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6947                 </fields>
6948                 <links>
6949                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6950                 </links>
6951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6952                         <actions>
6953                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6954                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6955                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6956                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6957                         </actions>
6958                 </permacrud>
6959         </class>
6960         <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">
6961                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6962                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6963                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6964                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6965                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6966                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6967                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6968                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6969                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6970                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6971                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6972                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6973                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6974                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6975                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6976                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6977                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6978                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6979                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6980                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6981                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6982                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6983                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6984                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6985                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6986                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6987                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6988                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6989                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6990                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6991                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6992                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6993                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6994                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6995                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6996                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6997                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6998                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6999                 </fields>
7000                 <links>
7001                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7002                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7003                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7004                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7005                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7006                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7007                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7008                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7009                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7010                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7011                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7012                 </links>
7013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7014                         <actions>
7015                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7016                         </actions>
7017                 </permacrud>
7018         </class>
7019         <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">
7020                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7021                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7022                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7023                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7024                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7025                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7026                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7027                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7028                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7029                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7030                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7031                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7032                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7033                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7034                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7035                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7036                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7037                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7038                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7039                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7040                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7041                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7042                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7043                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7044                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7045                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7046                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7047                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7048                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7049                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7050                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7051                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7052                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7053                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7054                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7055                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7056                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7057                 </fields>
7058                 <links>
7059                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7060                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7061                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7062                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7063                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7064                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7065                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7066                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7067                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7068                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7069                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7070                 </links>
7071                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7072                         <actions>
7073                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7074                         </actions>
7075                 </permacrud>
7076         </class>
7077
7078         <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">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
7080                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
7081                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
7082                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
7083                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
7084                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
7085                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
7086                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
7087                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
7088                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
7089                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
7090                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7091                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
7092                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7093                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
7094                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
7095                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
7096                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7097                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
7098                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
7099                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
7100                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
7101                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
7105                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
7106                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
7107                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
7108                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
7109                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
7110                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
7111                 </fields>
7112                 <links>
7113                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
7114                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
7115                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
7116                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
7117                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
7118                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
7119                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7120                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
7121                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
7122                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
7123                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
7124                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
7125                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
7126                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
7127                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
7128                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
7129                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
7130                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
7131                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
7132                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
7133                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
7134                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
7135                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
7136                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
7137                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
7138                 </links>
7139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7140             <actions>
7141                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
7142                 <retrieve />
7143                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
7144                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
7145             </actions>
7146         </permacrud>
7147         </class>
7148         <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">
7149                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
7150                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7151                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
7152                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
7153                 </fields>
7154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155                         <actions>
7156                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7157                                 <retrieve/>
7158                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7159                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7160                         </actions>
7161                 </permacrud>
7162         </class>
7163         <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">
7164                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
7165                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7166                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
7167                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
7168                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
7169                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
7170                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
7171                 </fields>
7172                 <links>
7173                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
7174                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7175                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
7176                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
7177                 </links>
7178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7179                         <actions>
7180                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7181                                 <retrieve/>
7182                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7183                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7184                         </actions>
7185                 </permacrud>
7186         </class>
7187         <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">
7188                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
7189                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7190                         <field name="btype" reporter:datatype="text"/>
7191                         <field name="id" reporter:datatype="id" />
7192                         <field name="name"  reporter:datatype="text"/>
7193                         <field name="description" reporter:datatype="text"/>
7194                         <field name="owner" reporter:datatype="link"/>
7195                         <field name="pub" reporter:datatype="bool"/>
7196                         <field name="create_time" reporter:datatype="timestamp" />
7197                         <field name="owning_lib" reporter:datatype="org_unit" />
7198                 </fields>
7199                 <links>
7200                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7201                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7202                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
7203                 </links>
7204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7205                         <actions>
7206                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7207                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7208                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7209                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7210                         </actions>
7211                 </permacrud>
7212         </class>
7213         <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">
7214                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
7215                         <field name="id" reporter:datatype="id" />
7216                         <field name="bucket" reporter:datatype="link"/>
7217                         <field name="note" reporter:datatype="text" />
7218                 </fields>
7219                 <links>
7220                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
7221                 </links>
7222         </class>
7223         <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">
7224                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
7225                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7226                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7227                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7228                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7229                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7230                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7231                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7232                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7233                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7234                 </fields>
7235                 <links>
7236                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7237                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
7238                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
7239                 </links>
7240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7241                         <actions>
7242                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7243                         </actions>
7244                 </permacrud>
7245         </class>
7246         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
7247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
7248                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
7249                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7250                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
7251                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7252                 </fields>
7253                 <links>
7254                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7255                 </links>
7256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7257                         <actions>
7258                                 <retrieve permission="VIEW_USER user_request.view">
7259                                         <context link="usr" field="home_ou" />
7260                                 </retrieve>
7261                         </actions>
7262                 </permacrud>
7263         </class>
7264     <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">
7265         <fields oils_persist:primary="field">
7266             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7267             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7268             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7269         </fields>
7270         <links/>
7271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7272             <actions>
7273                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
7274                 <retrieve />
7275                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
7276                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
7277             </actions>
7278         </permacrud>
7279     </class>
7280         <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">
7281                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
7282                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7283                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7284                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7285                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7286                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7287                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7288                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
7289                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7290                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7291                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7292                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7293                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
7294                 </fields>
7295                 <links>
7296                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7297                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
7298                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
7299                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
7300                 </links>
7301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7302             <actions>
7303                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
7304                 <retrieve />
7305                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
7306                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
7307             </actions>
7308         </permacrud>
7309         </class>
7310         <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">
7311                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
7312                         <field name="field" reporter:datatype="link"/>
7313                         <field name="id" reporter:datatype="id" />
7314                         <field name="source" reporter:datatype="link"/>
7315                         <field name="value"  reporter:datatype="text"/>
7316                 </fields>
7317                 <links>
7318                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7319                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7320                 </links>
7321         </class>
7322         <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">
7323                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
7324                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7325                         <field name="btype" reporter:datatype="text"/>
7326                         <field name="id" reporter:datatype="id" />
7327                         <field name="name"  reporter:datatype="text"/>
7328                         <field name="description" reporter:datatype="text"/>
7329                         <field name="owner" reporter:datatype="link"/>
7330                         <field name="pub" reporter:datatype="bool"/>
7331                         <field name="create_time" reporter:datatype="timestamp" />
7332                         <field name="owning_lib" reporter:datatype="org_unit" />
7333                 </fields>
7334                 <links>
7335                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7336                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7337                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7338                 </links>
7339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340                         <actions>
7341                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7342                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7343                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7344                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7345                         </actions>
7346                 </permacrud>
7347         </class>
7348         <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">
7349                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7350                         <field name="id" reporter:datatype="id" />
7351                         <field name="bucket" reporter:datatype="link"/>
7352                         <field name="note" reporter:datatype="text" />
7353                 </fields>
7354                 <links>
7355                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7356                 </links>
7357         </class>
7358         <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">
7359                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7360                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7361                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7362                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7363                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7364                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7365                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7366                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7367                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7368                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7369                 </fields>
7370                 <links>
7371                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7372                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7373                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7374                 </links>
7375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7376             <actions>
7377                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7378                     <context link="xact" jump="usr" field="home_ou"/>
7379                 </retrieve>
7380                         </actions>
7381                 </permacrud>
7382         </class>
7383         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7384                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7385                         <field name="id" reporter:datatype="id" />
7386                         <field name="ind1" />
7387                         <field name="ind2" />
7388                         <field name="record" />
7389                         <field name="subfield" />
7390                         <field name="tag" />
7391                         <field name="value" />
7392                 </fields>
7393                 <links>
7394                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7395                 </links>
7396         </class>
7397         <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">
7398                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7399                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7400                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7401                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7402                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7403                 </fields>
7404                 <links>
7405                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7406                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7407                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7408                 </links>
7409         </class>
7410         <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">
7411                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7412                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7413                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7414                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7415                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7416                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7417                 </fields>
7418                 <links>
7419                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7420                 </links>
7421         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7422             <actions>
7423                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7424                 <retrieve/>
7425                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7426                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7427             </actions>
7428         </permacrud>
7429
7430         </class>
7431         <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">
7432                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7433                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7434                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7435                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7436                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7437                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7438                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7439                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7440                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7441                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7442                 </fields>
7443                 <links>
7444                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7445                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7446                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7447                 </links>
7448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7449             <actions>
7450                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7451                 <retrieve/>
7452                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7453                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7454             </actions>
7455         </permacrud>
7456         </class>
7457         <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">
7458                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7459                         <field reporter:label="Creation Date" name="create_date" reporter:datatype="timestamp"/>
7460                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7461                         <field reporter:label="Last Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7462                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7463                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
7464                         <field reporter:label="Public" name="pub" reporter:datatype="bool"/>
7465                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
7466                         <field reporter:label="Note" name="value" reporter:datatype="text"/>
7467                         <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/> 
7468                 </fields>
7469                 <links>
7470                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7471                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7472                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7473                 </links>
7474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7475                 <actions>
7476                     <create permission="CREATE_RECORD_NOTE" global_required="true"/>
7477                     <retrieve/>
7478                     <update permission="UPDATE_RECORD_NOTE" global_required="true"/>
7479                     <delete permission="DELETE_RECORD_NOTE" global_required="true"/>
7480                 </actions>
7481              </permacrud>
7482         </class>
7483         <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">
7484                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7485                         <field name="balance_owed" reporter:datatype="money" />
7486                         <field name="total_owed" reporter:datatype="money" />
7487                         <field name="total_paid" reporter:datatype="money" />
7488                         <field name="usr" reporter:datatype="link"/>
7489                 </fields>
7490                 <links>
7491                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7492                 </links>
7493         </class>
7494     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7495                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7496                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7497                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7498                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7499                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7500                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7501                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7502                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7503                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7504                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7505                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7506                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7507                 </fields>
7508                 <links>
7509                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7510                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7511                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7512                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7513                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7514                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7515                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7516                 </links>
7517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7518             <actions>
7519                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7520             </actions>
7521         </permacrud>
7522         </class>
7523         <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">
7524                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7525                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7526                         <field name="quality" reporter:datatype="int" />
7527                         <field name="source" reporter:datatype="text"/>
7528                         <field name="transcendant" reporter:datatype="bool"/>
7529                         <field name="can_have_copies" reporter:datatype="bool"/>
7530                 </fields>
7531                 <links/>
7532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7533             <actions>
7534                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7535                 <retrieve/>
7536                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7537                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7538             </actions>
7539         </permacrud>
7540         </class>
7541         <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">
7542                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7543                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7544                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7545                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7546                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7547                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7548                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7549                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7550                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7551                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7552                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7553                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7554                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7555                 </fields>
7556                 <links>
7557                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7558                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7559                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7560                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7561                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7562                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7563                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7564                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7565                 </links>
7566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7567                         <actions>
7568                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7569                                         <context link="usr" field="home_ou" />
7570                                 </retrieve>
7571                         </actions>
7572                 </permacrud>
7573         </class>
7574         <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">
7575                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7576                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7577                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7578                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7579                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7580                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7581                 </fields>
7582                 <links>
7583                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7584                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7585                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7586                 </links>
7587         </class>
7588         <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">
7589                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7590                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7591                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7592                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7593                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7594                 </fields>
7595                 <links>
7596                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7597                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7598                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7599                 </links>
7600         </class>
7601         <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">
7602                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7603                         <field name="bucket" reporter:datatype="link"/>
7604                         <field name="id" reporter:datatype="id" />
7605                         <field name="target_user" reporter:datatype="link"/>
7606                         <field name="create_time" reporter:datatype="timestamp" />
7607                         <field name="pos" reporter:datatype="int" />
7608                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7609                 </fields>
7610                 <links>
7611                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7612                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7613             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7614                 </links>
7615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7616                         <actions>
7617                                 <retrieve permission="ADMIN_USER_BUCKET">
7618                     <context link="bucket" owning_lib="owning_lib"/>
7619                 </retrieve>
7620             </actions>
7621         </permacrud>
7622         </class>
7623         <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">
7624                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_id_seq">
7625                         <field name="id" reporter:datatype="id" />
7626                         <field name="staff" reporter:datatype="link"/>
7627                         <field name="bucket" reporter:datatype="link"/>
7628                         <field name="target" reporter:datatype="int" />
7629                         <field name="hold_type" reporter:datatype="text" />
7630                         <field name="run_date" reporter:datatype="timestamp" />
7631                         <field name="cancelled" reporter:datatype="timestamp" />
7632                         <field name="mappings" oils_persist:virtual="true" reporter:datatype="link" />
7633                 </fields>
7634                 <links>
7635                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7636                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7637                         <link field="mappings" reltype="has_many" key="batch_hold_event" map="" class="abhem"/>
7638                 </links>
7639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7640                         <actions>
7641                 <create permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7642                 <retrieve/>
7643                 <update permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7644                 <delete permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7645             </actions>
7646         </permacrud>
7647         </class>
7648         <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">
7649                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_map_id_seq">
7650                         <field name="id" reporter:datatype="id" />
7651                         <field name="batch_hold_event" reporter:datatype="link"/>
7652                         <field name="hold" reporter:datatype="link"/>
7653                 </fields>
7654                 <links>
7655                         <link field="batch_hold_event" reltype="has_a" key="id" map="" class="abhe"/>
7656                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7657                 </links>
7658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7659                         <actions>
7660                 <retrieve/>
7661             </actions>
7662         </permacrud>
7663         </class>
7664         <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">
7665                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7666                         <field name="id" reporter:datatype="id" />
7667                         <field name="item" reporter:datatype="link"/>
7668                         <field name="note" reporter:datatype="text" />
7669                 </fields>
7670                 <links>
7671                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7672                 </links>
7673         </class>
7674         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7675                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7676                         <field name="balance_owed" reporter:datatype="money" />
7677                         <field name="total_owed" reporter:datatype="money" />
7678                         <field name="total_paid" reporter:datatype="money" />
7679                         <field name="usr" reporter:datatype="link"/>
7680                 </fields>
7681                 <links>
7682                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7683                 </links>
7684         </class>
7685         <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">
7686                 <fields oils_persist:primary="code" oils_persist:sequence="">
7687                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7688                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7689                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7690                 </fields>
7691                 <links/>
7692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7693             <actions>
7694                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7695                 <retrieve/>
7696                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7697                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7698             </actions>
7699         </permacrud>
7700         </class>
7701         <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">
7702                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7703                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7704                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7705                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7706                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7707                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7708                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7709                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7710                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7711                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7712                 </fields>
7713                 <links>
7714                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7715                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7716                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7717                 </links>
7718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7719             <actions>
7720                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7721                     <context link="xact" jump="usr" field="home_ou"/>
7722                 </retrieve>
7723                         </actions>
7724                 </permacrud>
7725         </class>
7726         <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">
7727                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7728                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7729                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7730                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7731                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7732                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7733                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7734                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7735                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7736                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7737                 </fields>
7738                 <links>
7739                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7740                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7741                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7742                 </links>
7743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7744             <actions>
7745                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7746                     <context link="xact" jump="usr" field="home_ou"/>
7747                 </retrieve>
7748                         </actions>
7749                 </permacrud>
7750         </class>
7751         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7752                 <fields oils_persist:primary="id" oils_persist:sequence="">
7753                         <field name="checkin_lib" reporter:datatype="link"/>
7754                         <field name="checkin_staff" reporter:datatype="link"/>
7755                         <field name="checkin_time" reporter:datatype="timestamp"/>
7756                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7757                         <field name="circ_staff" reporter:datatype="link"/>
7758                         <field name="desk_renewal" reporter:datatype="bool"/>
7759                         <field name="due_date" reporter:datatype="timestamp"/>
7760                         <field name="duration" reporter:datatype="interval"/>
7761                         <field name="duration_rule" reporter:datatype="link"/>
7762                         <field name="fine_interval" reporter:datatype="interval"/>
7763                         <field name="id" reporter:datatype="id" />
7764                         <field name="max_fine" reporter:datatype="money" />
7765                         <field name="max_fine_rule" reporter:datatype="link"/>
7766                         <field name="opac_renewal" reporter:datatype="bool"/>
7767                         <field name="phone_renewal" reporter:datatype="bool"/>
7768                         <field name="recurring_fine" reporter:datatype="money" />
7769                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7770                         <field name="renewal_remaining" reporter:datatype="int" />
7771             <field name="grace_period" reporter:datatype="interval" />
7772                         <field name="stop_fines" reporter:datatype="text"/>
7773                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7774                         <field name="target_copy" reporter:datatype="link"/>
7775                         <field name="usr" reporter:datatype="link"/>
7776                         <field name="xact_finish" reporter:datatype="timestamp" />
7777                         <field name="xact_start" reporter:datatype="timestamp" />
7778                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7779                         <field name="auto_renewal" reporter:datatype="bool"/>
7780                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7781                 </fields>
7782                 <links>
7783                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7784                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7785                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7786                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7787                 </links>
7788         </class>
7789         <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">
7790                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7791                         <field name="field" reporter:datatype="link"/>
7792                         <field name="id" reporter:datatype="id" />
7793                         <field name="source" reporter:datatype="link"/>
7794                         <field name="value" reporter:datatype="text"/>
7795                 </fields>
7796                 <links>
7797                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7798                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7799                 </links>
7800         </class>
7801         <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">
7802                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7803                         <field name="high" reporter:datatype="money" />
7804                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7805                         <field name="low" reporter:datatype="money" />
7806                         <field name="name" reporter:datatype="text"/>
7807                         <field name="normal" reporter:datatype="money" />
7808                         <field name="recurrence_interval" reporter:datatype="interval"/>
7809             <field name="grace_period" reporter:datatype="interval" />
7810                 </fields>
7811                 <links/>
7812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7813             <actions>
7814                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7815                 <retrieve/>
7816                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7817                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7818             </actions>
7819         </permacrud>
7820         </class>
7821         <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">
7822                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7823                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7824                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7825                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7826                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7827                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7828                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7829                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7830                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7831                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7832                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7833                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7834                 </fields>
7835                 <links>
7836                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7837                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7838                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7839                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7840                 </links>
7841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7842             <actions>
7843                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7844                     <context link="xact" jump="usr" field="home_ou"/>
7845                 </retrieve>
7846                         </actions>
7847                 </permacrud>
7848         </class>
7849         <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">
7850                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7851                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7852                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7853                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7854                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7855                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7856                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7857                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7858                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7859                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7860                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7861                 </fields>
7862                 <links>
7863                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7864                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7865                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7866                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7867                 </links>
7868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7869             <actions>
7870                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7871                     <context link="xact" jump="usr" field="home_ou"/>
7872                 </retrieve>
7873                         </actions>
7874                 </permacrud>
7875         </class>
7876         <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">
7877                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7878                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7879                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7880                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7881                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7882                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7883                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7884                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7885                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7886                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7887                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7888                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7889                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7890                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7891                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7892                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7893                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7894                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7895                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7896                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7897                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7898                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7899                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7900                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7901                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7902                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7903                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7904                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7905                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7906                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7907                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7908                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7909                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7910                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7911                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7912                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7913                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7914                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7915                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7916                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7917                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7918                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7919                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7920                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7921                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7922                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7923                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7924                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7925                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7926                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7927                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7928                 </fields>
7929                 <links>
7930                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7931                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7932                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7933                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7934                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7935                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7936                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7937                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7938                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7939                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7940                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7941                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7942                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7943                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7944                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7945                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7946                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7947                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7948                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7949                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7950                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7951                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7952                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7953                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7954                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7955                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7956                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7957                 </links>
7958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7959             <actions>
7960                 <create permission="CREATE_COPY">
7961                     <context link="call_number" field="owning_lib"/>
7962                 </create>
7963                 <retrieve/>
7964                 <update permission="UPDATE_COPY">
7965                     <context link="call_number" field="owning_lib"/>
7966                 </update>
7967                 <delete permission="DELETE_COPY">
7968                     <context link="call_number" field="owning_lib"/>
7969                 </delete>
7970             </actions>
7971         </permacrud>
7972         </class>
7973
7974         <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">
7975                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7976             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7977                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7978                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7979                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7980                 </fields>
7981                 <links>
7982                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7983                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7984                 </links>
7985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7986             <actions>
7987                                 <create/>
7988                                 <retrieve/>
7989                                 <update/>
7990                                 <delete/>
7991             </actions>
7992         </permacrud>
7993         </class>
7994
7995         <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">
7996                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7997                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7998                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7999                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8000                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8001                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8002                         <field reporter:label="Event" name="event" reporter:datatype="text" />
8003                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
8004                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
8005                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
8006                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
8007                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
8008                 </fields>
8009                 <links>
8010                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
8011                 </links>
8012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8013             <actions>
8014                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8015                 <retrieve/>
8016                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8017                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
8018             </actions>
8019         </permacrud>
8020         </class>
8021
8022         <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">
8023                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
8024                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8025                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
8026                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8027                 </fields>
8028                 <links>
8029                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8030                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8031                 </links>
8032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8033             <actions>
8034                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8035                 <retrieve/>
8036                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8037                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
8038             </actions>
8039         </permacrud>
8040         </class>
8041
8042         <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">
8043                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
8044                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8045                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8046                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8047                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8048                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8049                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8050                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8051                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8052                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8053                 </fields>
8054                 <links>
8055                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8056                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8057                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8058                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8059                 </links>
8060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8061             <actions>
8062                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8063                     <context link="copy" field="circ_lib"/>
8064                 </create>
8065                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8066                     <context link="copy" field="circ_lib"/>
8067                                 </retrieve>
8068                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8069                     <context link="copy" field="circ_lib"/>
8070                                 </update>
8071                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8072                     <context link="copy" field="circ_lib"/>
8073                                 </delete>
8074             </actions>
8075         </permacrud>
8076         </class>
8077
8078         <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">
8079                 <fields oils_persist:primary="id">
8080                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8081                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8082                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8083                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8084                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8085                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8086                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8087                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8088                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8089                 </fields>
8090                 <links>
8091                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8092                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8093                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8094                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8095                 </links>
8096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8097             <actions>
8098                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8099                     <context link="copy" field="circ_lib"/>
8100                 </create>
8101                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8102                     <context link="copy" field="circ_lib"/>
8103                                 </retrieve>
8104                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8105                     <context link="copy" field="circ_lib"/>
8106                                 </update>
8107                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8108                     <context link="copy" field="circ_lib"/>
8109                                 </delete>
8110             </actions>
8111         </permacrud>
8112         </class>
8113
8114         <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">
8115                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
8116                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
8117                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
8118                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8119                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8120                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8121                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8122                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8123                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
8124                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
8125                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8126                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8127                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8128                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
8129                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
8130                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
8131                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
8132                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
8133                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
8134                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
8135                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
8136                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
8137                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
8138                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
8139                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8140                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
8141                 </fields>
8142                 <links>
8143                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8144                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8145                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8146                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8147                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8148                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8149                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8150                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8151                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8152                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8153                 </links>
8154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8155                         <actions>
8156                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8157                                 <retrieve />
8158                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8159                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8160                         </actions>
8161                 </permacrud>
8162         </class>
8163
8164         <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">
8165                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
8166                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
8167                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8168                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8169                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
8170                 </fields>
8171                 <links/>
8172         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8173             <actions>
8174                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8175                 <retrieve/>
8176                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8177                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8178             </actions>
8179         </permacrud>
8180         </class>
8181         <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">
8182                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
8183                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
8184                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8185                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8186                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
8187                 </fields>
8188                 <links/>
8189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8190             <actions>
8191                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8192                 <retrieve/>
8193                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8194                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8195             </actions>
8196         </permacrud>
8197         </class>
8198         <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">
8199                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
8200                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8201                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8202                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8203                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8204                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8205                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
8206                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
8207                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
8208                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
8209                 </fields>
8210                 <links>
8211                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
8212                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
8213                 </links>
8214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8215             <actions>
8216                 <create permission="CREATE_PERM" global_required="true"/>
8217                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8218                 <update permission="UPDATE_PERM" global_required="true"/>
8219                 <delete permission="DELETE_PERM" global_required="true"/>
8220             </actions>
8221         </permacrud>
8222         </class>
8223         <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">
8224                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
8225                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8226                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
8227                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8228                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
8229                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8230                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8231                 </fields>
8232                 <links>
8233                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
8234                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8235                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8236                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
8237                 </links>
8238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8239                         <actions>
8240                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8241                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8242                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8243                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8244                         </actions>
8245                 </permacrud>
8246         </class>
8247         <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">
8248                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
8249                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
8250                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
8251                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
8252                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
8253                 </fields>
8254                 <links>
8255                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
8256                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
8257                 </links>
8258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8259             <actions>
8260                 <create permission="ADMIN_SURVEY">
8261                     <context link="question" jump="survey" field="owner"/>
8262                 </create>
8263                 <retrieve/>
8264                 <update permission="ADMIN_SURVEY">
8265                     <context link="question" jump="survey" field="owner"/>
8266                 </update>
8267                 <delete permission="ADMIN_SURVEY">
8268                     <context link="question" jump="survey" field="owner"/>
8269                 </delete>
8270             </actions>
8271         </permacrud>
8272         </class>
8273         <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">
8274                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
8275                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8276                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
8277                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
8278                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
8279                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
8280                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
8281                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
8282                 </fields>
8283                 <links>
8284                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
8285                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
8286                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
8287                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8288                 </links>
8289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8290                         <actions>
8291                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
8292                         </actions>
8293                 </permacrud>
8294         </class>
8295         <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">
8296                 <fields oils_persist:primary="usr" oils_persist:sequence="">
8297                         <field name="balance_owed" reporter:datatype="money" />
8298                         <field name="total_owed" reporter:datatype="money" />
8299                         <field name="total_paid" reporter:datatype="money" />
8300                         <field name="usr" reporter:datatype="link"/>
8301                 </fields>
8302                 <links>
8303                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8304                 </links>
8305         </class>
8306         <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">
8307                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
8308                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
8309                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
8310                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
8311                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
8312                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8313                 </fields>
8314                 <links>
8315                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8316                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
8317                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8318                 </links>
8319         </class>
8320         <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">
8321                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
8322                         <field name="field" reporter:datatype="link"/>
8323                         <field name="id" reporter:datatype="id" />
8324                         <field name="source" reporter:datatype="link"/>
8325                         <field name="value" reporter:datatype="text"/>
8326                 </fields>
8327                 <links>
8328                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8329                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8330                 </links>
8331         </class>
8332         <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">
8333                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
8334                         <field name="field" reporter:datatype="link"/>
8335                         <field name="id" reporter:datatype="id" />
8336                         <field name="source" reporter:datatype="link"/>
8337                         <field name="value" reporter:datatype="text"/>
8338                 </fields>
8339                 <links>
8340                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8341                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8342                 </links>
8343         </class>
8344         <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">
8345                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
8346                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
8347                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
8348                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
8349                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
8350                 </fields>
8351                 <links>
8352                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
8353                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
8354                 </links>
8355         </class>
8356         <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">
8357                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
8358                         <field name="depth" reporter:datatype="int" />
8359                         <field name="grantable" reporter:datatype="bool"/>
8360                         <field name="grp" reporter:datatype="link"/>
8361                         <field name="id" reporter:datatype="id" />
8362                         <field name="perm" reporter:datatype="link"/>
8363                 </fields>
8364                 <links>
8365                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8366                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8367                 </links>
8368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8369             <actions>
8370                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
8371                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
8372                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
8373                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
8374             </actions>
8375         </permacrud>
8376         </class>
8377         <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">
8378                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8379                         <field name="items" oils_persist:virtual="true" />
8380                         <field name="btype" reporter:datatype="text"/>
8381                         <field name="id" reporter:datatype="id" />
8382                         <field name="name" reporter:datatype="text"/>
8383                         <field name="description" reporter:datatype="text"/>
8384                         <field name="owner" reporter:datatype="link"/>
8385                         <field name="pub" reporter:datatype="bool"/>
8386                         <field name="create_time" reporter:datatype="timestamp" />
8387                         <field name="owning_lib" reporter:datatype="org_unit" />
8388                 </fields>
8389                 <links>
8390                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8391                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8392                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8393                 </links>
8394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8395                         <actions>
8396                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8397                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8398                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8399                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8400                         </actions>
8401                 </permacrud>
8402         </class>
8403         <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">
8404                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8405                         <field name="id" reporter:datatype="id" />
8406                         <field name="bucket" reporter:datatype="link"/>
8407                         <field name="note" reporter:datatype="text" />
8408                 </fields>
8409                 <links>
8410                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8411                 </links>
8412         </class>
8413         <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">
8414                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8415                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8416                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8417                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8418                 </fields>
8419                 <links>
8420                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8421                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8422                 </links>
8423         </class>
8424         <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">
8425                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8426                         <field name="depth" reporter:datatype="int"/>
8427                         <field name="grantable" reporter:datatype="bool"/>
8428                         <field name="id" reporter:datatype="id" />
8429                         <field name="perm" reporter:datatype="link"/>
8430                         <field name="usr" reporter:datatype="link"/>
8431                 </fields>
8432                 <links>
8433                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8434                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8435                 </links>
8436         </class>
8437         <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">
8438                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8439                         <field name="object_id" reporter:datatype="text"/>
8440                         <field name="grantable" reporter:datatype="bool"/>
8441                         <field name="id" reporter:datatype="id" />
8442                         <field name="perm" reporter:datatype="link"/>
8443                         <field name="usr" reporter:datatype="link"/>
8444                         <field name="object_type" reporter:datatype="text"/>
8445                 </fields>
8446                 <links>
8447                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8448                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8449                 </links>
8450         </class>
8451         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8452                 <fields oils_persist:primary="id" oils_persist:sequence="">
8453                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8454                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8455                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8456                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8457                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8458                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8459                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8460                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8461                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8462                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8463                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8464                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8465                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8466                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8467                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8468                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8469                 </fields>
8470                 <links>
8471                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8472                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8473                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8474                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8475                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8476                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8477                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8478                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8479                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8480                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8481                 </links>
8482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8483             <actions>
8484                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8485                     <context link="xact" jump="usr" field="home_ou"/>
8486                 </retrieve>
8487                         </actions>
8488                 </permacrud>
8489         </class>
8490         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8491                 oils_obj:fieldmapper="money::aged_payment" 
8492                 oils_persist:tablename="money.aged_payment" 
8493                 reporter:label="Payments: Aged">
8494                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8495                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8496                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8497                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8498                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8499                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8500                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8501                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8502                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8503                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8504                         <field name="billing" reporter:datatype="link"/>
8505                 </fields>
8506                 <links>
8507                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8508                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8509                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8510                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8511                 </links>
8512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8513                         <actions>
8514                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8515                                         <context link="xact" field="usr_home_ou"/>
8516                                 </retrieve>
8517                         </actions>
8518                 </permacrud>
8519         </class>
8520         <class id="mallp" controller="open-ils.cstore" 
8521                 oils_obj:fieldmapper="money::all_payments" 
8522                 oils_persist:tablename="money.all_payments" 
8523                 oils_persist="readonly" reporter:core="true"
8524                 reporter:label="Payments: All">
8525                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8526                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8527                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8528                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8529                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8530                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8531                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8532                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8533                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8534                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8535                         <field name="billing" reporter:datatype="link"/>
8536                 </fields>
8537                 <links>
8538                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8539                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8540                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8541                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8542                 </links>
8543         </class>
8544
8545         <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">
8546                 <fields oils_persist:primary="id" oils_persist:sequence="">
8547                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8548                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8549                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8550                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8551                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8552                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8553                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8554                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8555                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8556                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8557                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8558                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8559                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8560                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8561                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8562                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8563                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8564                 </fields>
8565                 <links>
8566                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8567                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8568                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8569                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8570                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8571                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8572                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8573                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8574                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8575                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8576                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8577                 </links>
8578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8579                         <actions>
8580                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8581                                         <context link="xact" jump="usr" field="home_ou"/>
8582                                 </retrieve>
8583                         </actions>
8584                 </permacrud>
8585         </class>
8586         <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">
8587                 <fields oils_persist:primary="id" oils_persist:sequence="">
8588                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8589                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8590                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8591                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8592                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8593                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8594                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8595                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8596                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8597                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8598                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8599                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8600                 </fields>
8601                 <links>
8602                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8603                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8604                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8605                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8606                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8607                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8608                 </links>
8609         </class>
8610         <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">
8611                 <fields oils_persist:primary="id" oils_persist:sequence="">
8612                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8613                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8614                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8615                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8616                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8617                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8618                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8619                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8620                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8621                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8622                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8623                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8624                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8625                 </fields>
8626                 <links>
8627                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8628                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8629                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8630                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8631                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8632                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8633                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8634                 </links>
8635         </class>
8636         <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">
8637                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8638                         <field name="bucket" reporter:datatype="link"/>
8639                         <field name="id" reporter:datatype="id" />
8640                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8641                         <field name="create_time" reporter:datatype="timestamp" />
8642                         <field name="pos" reporter:datatype="int" />
8643                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8644                 </fields>
8645                 <links>
8646                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8647                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8648             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8649                 </links>
8650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8651                         <actions>
8652                                 <retrieve permission="ADMIN_COPY_BUCKET">
8653                     <context link="bucket" owning_lib="owning_lib"/>
8654                 </retrieve>
8655             </actions>
8656         </permacrud>
8657         </class>
8658         <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">
8659                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8660                         <field name="id" reporter:datatype="id" />
8661                         <field name="item" reporter:datatype="link"/>
8662                         <field name="note" reporter:datatype="text" />
8663                 </fields>
8664                 <links>
8665                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8666                 </links>
8667         </class>
8668         <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">
8669                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8670                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8671                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8672                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8673                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8674                 </fields>
8675                 <links>
8676                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8677                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8678                 </links>
8679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8680                         <actions>
8681                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8682                         </actions>
8683                 </permacrud>
8684         </class>
8685     <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">
8686         <fields oils_persist:primary="field">
8687             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8688             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8689             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8690         </fields>
8691         <links/>
8692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8693             <actions>
8694                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8695                 <retrieve />
8696                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8697                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8698             </actions>
8699         </permacrud>
8700     </class>
8701         <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">
8702                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8703                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8704                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8705                 </fields>
8706                 <links/>
8707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8708             <actions>
8709                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8710                 <retrieve/>
8711                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8712                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8713             </actions>
8714         </permacrud>
8715         </class>
8716
8717
8718         <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">
8719                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8720                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8721                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8722                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8723                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8724                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8725                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8726                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8727                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8728                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8729                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8730                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8731                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8732                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8733                 </fields>
8734                 <links>
8735                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8736                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8737                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8738                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8739                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8740                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8741                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8742                 </links>
8743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8744             <actions>
8745                 <create permission="TRANSIT_COPY">
8746                     <context link="target_copy" field="owner"/>
8747                 </create>
8748                 <retrieve/>
8749                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8750                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8751             </actions>
8752         </permacrud>
8753         </class>
8754         <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">
8755                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8756                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8757                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8758                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8759                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8760                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8761                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8762                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8763                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8764                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8765                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8766                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8767                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8768                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8769                 </fields>
8770                 <links>
8771                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8772                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8773                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8774                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8775                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8776                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8777                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8778                 </links>
8779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8780             <actions>
8781                 <create permission="TRANSIT_COPY" context_field="owner">
8782                     <context link="target_copy" field="circ_lib"/>
8783                 </create>
8784                 <retrieve/>
8785                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8786                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8787             </actions>
8788         </permacrud>
8789         </class>
8790         <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">
8791                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8792                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8793                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8794                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8795                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8796                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8797                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8798                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8799                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8800                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8801                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8802                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8803                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8804                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8805                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8806                 </fields>
8807                 <links>
8808                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8809                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8810                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8811                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8812                 </links>
8813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8814             <actions>
8815                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8816                     <context link="xact" jump="usr" field="home_ou"/>
8817                 </retrieve>
8818                         </actions>
8819                 </permacrud>
8820         </class>
8821         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8822                 oils_obj:fieldmapper="money::aged_billing" 
8823                 oils_persist:tablename="money.aged_billing" 
8824                 reporter:label="Aged Billing Line Item">
8825                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8826                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8827                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8828                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8829                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8830                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8831                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8832                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8833                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8834                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8835                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8836                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8837                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8838                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8839                 </fields>
8840                 <links>
8841                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8842                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8843                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8844                 </links>
8845                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8846                         <actions>
8847                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8848                                         <context link="xact" field="usr_home_ou"/>
8849                                 </retrieve>
8850                         </actions>
8851                 </permacrud>
8852         </class>
8853         <class id="mallb" controller="open-ils.cstore" 
8854                 oils_obj:fieldmapper="money::all_billings" 
8855                 oils_persist:tablename="money.all_billings" 
8856                 oils_persist="readonly" reporter:label="All Billing Line Items">
8857                 <fields oils_persist:primary="id" oils_persist:sequence="">
8858                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8859                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8860                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8861                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8862                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8863                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8864                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8865                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8866                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8867                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8868                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8869                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8870                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8871                 </fields>
8872                 <links>
8873                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8874                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8875                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8876                 </links>
8877         </class>
8878         <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">
8879                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8880                         <field name="grp" />
8881                         <field name="id" reporter:datatype="id" />
8882                         <field name="usr" />
8883                 </fields>
8884                 <links>
8885                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8886                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8887                 </links>
8888         </class>
8889         <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">
8890                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8891                         <field name="id" reporter:datatype="id" />
8892                         <field name="fq_field" reporter:datatype="text"/>
8893                         <field name="identity_value" reporter:datatype="text"/>
8894                         <field name="translation" reporter:datatype="text"/>
8895                         <field name="string" reporter:datatype="text"/>
8896                 </fields>
8897                 <links>
8898                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8899                 </links>
8900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8901             <actions>
8902                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8903                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8904                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8905                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8906             </actions>
8907         </permacrud>
8908         </class>
8909         <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">
8910                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8911                         <field name="id" reporter:datatype="id" />
8912                         <field name="fm_class" reporter:datatype="text"/>
8913                         <field name="field" reporter:datatype="text"/>
8914                         <field name="owner" reporter:datatype="org_unit"/>
8915                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8916                 </fields>
8917                 <links>
8918                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8919                 </links>
8920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8921             <actions>
8922                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8923                 <retrieve/>
8924                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8925                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8926             </actions>
8927         </permacrud>
8928         </class>
8929         <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">
8930                 <fields oils_persist:primary="code">
8931                         <field name="code" reporter:datatype="id" />
8932                         <field name="marc_code" reporter:datatype="text"/>
8933                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8934                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8935                         <field name="rtl" reporter:datatype="bool"/>
8936                 </fields>
8937                 <links/>
8938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8939             <actions>
8940                 <create permission="CREATE_LOCALE" global_required="true"/>
8941                 <retrieve/>
8942                 <update permission="UPDATE_LOCALE" global_required="true"/>
8943                 <delete permission="DELETE_LOCALE" global_required="true"/>
8944             </actions>
8945         </permacrud>
8946         </class>
8947         <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">
8948                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8949                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8950                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8951                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8952                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8953                 </fields>
8954                 <links>
8955                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8956                 </links>
8957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8958             <actions>
8959                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8960                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8961                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8962                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8963             </actions>
8964         </permacrud>
8965         </class>
8966
8967         <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">
8968                 <fields oils_persist:primary="id">
8969                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8970                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8971                 </fields>
8972                 <links/>
8973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8974             <actions>
8975                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8976                 <retrieve/>
8977                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8978                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8979             </actions>
8980         </permacrud>
8981         </class>
8982
8983         <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">
8984                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8985                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8986                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8987                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8988                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8989                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8990                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8991                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8992                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8993                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8994                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8995                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8996                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8997                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8998                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8999                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9000                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9001                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9002                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9003                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9004                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9005                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9006                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9007                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9008                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9009                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9010                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9011                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9012                 </fields>
9013                 <links>
9014                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9015                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9016                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9017                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9018                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9019                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9020                 </links>
9021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9022             <actions>
9023                 <create permission="user_request.create">
9024                     <context link="usr" field="home_ou"/>
9025                                 </create>
9026                 <retrieve permission="user_request.view">
9027                     <context link="usr" field="home_ou"/>
9028                                 </retrieve>
9029                 <update permission="user_request.update">
9030                     <context link="usr" field="home_ou"/>
9031                                 </update>
9032                 <delete permission="user_request.delete">
9033                     <context link="usr" field="home_ou"/>
9034                                 </delete>
9035             </actions>
9036         </permacrud>
9037         </class>
9038
9039         <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">
9040         <oils_persist:source_definition><![CDATA[
9041             SELECT r.*, CASE
9042                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
9043                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
9044                         WHEN l.state = 'received' THEN 5 -- Received
9045                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
9046                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
9047                         WHEN l.id IS NOT NULL THEN 2 -- Pending
9048                         WHEN l.id IS NULL THEN 1 -- New
9049                         ELSE 0 -- Error
9050                     END AS request_status
9051                     ,u.home_ou
9052             FROM      acq.user_request r
9053             JOIN actor.usr u ON (r.usr = u.id)
9054             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
9055             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
9056             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
9057         ]]></oils_persist:source_definition>
9058                 <fields oils_persist:primary="id">
9059                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9060                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9061                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9062                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9063                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9064                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9065                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9066                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9067                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9068                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9069                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9070                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9071                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9072                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9073                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9074                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9075                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9076                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9077                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9078                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9079                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9080                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9081                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9082                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9083                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9084                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9085                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9086                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
9087                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
9088                 </fields>
9089                 <links>
9090                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9091                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9092                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9093                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9094                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9095                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9096                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
9097                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9098                 </links>
9099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9100             <actions>
9101                 <retrieve permission="user_request.view">
9102                     <context link="usr" field="home_ou"/>
9103                                 </retrieve>
9104             </actions>
9105         </permacrud>
9106         </class>
9107
9108         <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">
9109                 <fields oils_persist:primary="id">
9110                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9111                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9112                 </fields>
9113                 <links/>
9114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9115             <actions>
9116                 <retrieve/>
9117             </actions>
9118         </permacrud>
9119         </class>
9120
9121         <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">
9122                 <fields oils_persist:primary="code">
9123                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
9124                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9125                 </fields>
9126                 <links/>
9127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9128             <actions>
9129                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9130                 <retrieve/>
9131                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9132                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9133             </actions>
9134         </permacrud>
9135         </class>
9136
9137         <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">
9138                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
9139                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
9140                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
9141                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
9142                         <field reporter:label="Ratio" name="ratio" />
9143                 </fields>
9144                 <links>
9145                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
9146                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
9147                 </links>
9148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9149                         <actions>
9150                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9151                                 <retrieve/>
9152                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9153                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9154                         </actions>
9155                 </permacrud>
9156         </class>
9157
9158         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
9159                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
9160                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9161                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9162                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
9163                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
9164                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
9165                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
9166                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
9167                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
9168                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
9169                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9170                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9171                         <field reporter:label="URL" name="url" reporter:datatype="text" />
9172                         <field reporter:label="Email" name="email" reporter:datatype="text" />
9173                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
9174                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
9175                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
9176                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
9177                         <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
9178                         <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
9179                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
9180                         <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
9181                         <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9182                         <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
9183                 </fields>
9184                 <links>
9185                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9186                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9187                         <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
9188                         <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
9189                         <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
9190                         <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
9191                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
9192                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
9193                         <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
9194                         <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
9195                         <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
9196                 </links>
9197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9198             <actions>
9199                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
9200                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
9201                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
9202                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
9203             </actions>
9204         </permacrud>
9205         </class>
9206
9207         <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">
9208                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
9209                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9210                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9211                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9212                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9213                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9214                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9215                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9216                 </fields>
9217                 <links>
9218                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9219                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9220                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9221                 </links>
9222         </class>
9223
9224         <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">
9225                 <fields oils_persist:primary="code">
9226                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
9227                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9228                 </fields>
9229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9230             <actions>
9231                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9232                 <retrieve/>
9233                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9234                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9235             </actions>
9236                 </permacrud>
9237         </class>
9238
9239         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
9240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
9241                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
9242                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
9243                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9244                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
9245                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
9246                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
9247                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
9248                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
9249                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
9250                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
9251                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9252                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
9253                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
9254                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
9255                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
9256                 </fields>
9257                 <links>
9258                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
9259                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9260                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
9261                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
9262                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
9263                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
9264                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
9265                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
9266                 </links>
9267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9268             <actions>
9269                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
9270                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
9271                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
9272                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
9273             </actions>
9274         </permacrud>
9275         </class>
9276
9277         <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">
9278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
9279                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9280                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9281                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9282                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
9283                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
9284                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
9285                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9286                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
9287                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9288                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9289                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9290                 </fields>
9291                 <links>
9292                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9293                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9294                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9295                 </links>
9296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9297             <actions>
9298                 <create   permission="ADMIN_INVOICE">
9299                                         <context link="invoice" field="receiver"/>
9300                                 </create>
9301                 <retrieve permission="ADMIN_INVOICE">
9302                                         <context link="invoice" field="receiver"/>
9303                                 </retrieve>
9304                 <update   permission="ADMIN_INVOICE">
9305                                         <context link="invoice" field="receiver"/>
9306                                 </update>
9307                                 <delete   permission="ADMIN_INVOICE">
9308                                         <context link="invoice" field="receiver"/>
9309                                 </delete>
9310             </actions>
9311         </permacrud>
9312         </class>
9313
9314         <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">
9315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
9316                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9317                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9318                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9319                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9320                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
9321                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
9322                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9323                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9324                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9325                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9326                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9327                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9328                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
9329                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9330                 </fields>
9331                 <links>
9332                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9333                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9334                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9335                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9336                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9337                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
9338                 </links>
9339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9340             <actions>
9341                 <create   permission="ADMIN_INVOICE">
9342                                         <context link="invoice" field="receiver"/>
9343                                 </create>
9344                 <retrieve permission="ADMIN_INVOICE">
9345                                         <context link="invoice" field="receiver"/>
9346                                 </retrieve>
9347                 <update   permission="ADMIN_INVOICE">
9348                                         <context link="invoice" field="receiver"/>
9349                                 </update>
9350                                 <delete   permission="ADMIN_INVOICE">
9351                                         <context link="invoice" field="receiver"/>
9352                                 </delete>
9353             </actions>
9354         </permacrud>
9355         </class>
9356
9357         <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">
9358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
9359                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
9360                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9361                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9362                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9363                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9364                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9365                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text" oils_obj:required="true"/>
9366                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9367                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9368                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
9369                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
9370                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9371                 </fields>
9372                 <links>
9373                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9374                 </links>
9375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9376             <actions>
9377                 <create permission="ADMIN_PROVIDER">
9378                     <context link="provider" field="owner"/>
9379                 </create>
9380                 <retrieve permission="ADMIN_PROVIDER">
9381                     <context link="provider" field="owner"/>
9382                 </retrieve>
9383                 <update permission="ADMIN_PROVIDER">
9384                     <context link="provider" field="owner"/>
9385                 </update>
9386                 <delete permission="ADMIN_PROVIDER">
9387                     <context link="provider" field="owner"/>
9388                 </delete>
9389             </actions>
9390         </permacrud>
9391         </class>
9392
9393         <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">
9394                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9395                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9396                         <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
9397                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9398                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9399                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9400                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9401                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
9402         </fields>
9403                 <links>
9404                         <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
9405                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9406                 </links>
9407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9408             <actions>
9409                 <create permission="ADMIN_PROVIDER">
9410                     <context link="provider" field="owner"/>
9411                 </create>
9412                 <retrieve permission="ADMIN_PROVIDER">
9413                     <context link="provider" field="owner"/>
9414                 </retrieve>
9415                 <update permission="ADMIN_PROVIDER">
9416                     <context link="provider" field="owner"/>
9417                 </update>
9418                 <delete permission="ADMIN_PROVIDER">
9419                     <context link="provider" field="owner"/>
9420                 </delete>
9421             </actions>
9422         </permacrud>
9423     </class>
9424         <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">
9425                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9426                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9427                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9428                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9429                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9430                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9431                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
9432                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9433                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9434                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9435                         <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
9436                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9437                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9438                 </fields>
9439                 <links>
9440                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9441                 </links>
9442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9443             <actions>
9444                 <create permission="ADMIN_PROVIDER">
9445                     <context link="contact" jump='provider' field="owner"/>
9446                 </create>
9447                 <retrieve permission="ADMIN_PROVIDER">
9448                     <context link="contact" jump='provider' field="owner"/>
9449                 </retrieve>
9450                 <update permission="ADMIN_PROVIDER">
9451                     <context link="contact" jump='provider' field="owner"/>
9452                 </update>
9453                 <delete permission="ADMIN_PROVIDER">
9454                     <context link="contact" jump='provider' field="owner"/>
9455                 </delete>
9456             </actions>
9457         </permacrud>
9458         </class>
9459
9460         <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">
9461                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9462                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9463                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9464                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9465                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9466                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9467                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9468                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9469                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9470                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9471                 </fields>
9472                 <links>
9473                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9474                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9475                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9476                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9477                 </links>
9478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9479             <actions>
9480                 <create permission="ADMIN_ACQ_FUND">
9481                     <context link="src_fund" field="org"/>
9482                 </create>
9483                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9484                     <context link="src_fund" field="org"/>
9485                     <context link="dest_fund" field="org"/>
9486                 </retrieve>
9487                 <update permission="ADMIN_ACQ_FUND">
9488                     <context link="src_fund" field="org"/>
9489                 </update>
9490                 <delete permission="ADMIN_ACQ_FUND">
9491                     <context link="src_fund" field="org"/>
9492                 </delete>
9493             </actions>
9494         </permacrud>
9495         </class>
9496
9497         <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">
9498                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9499                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9500                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9501                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9502                 </fields>
9503                 <links>
9504             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9505                 </links>
9506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9507                         <actions>
9508                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9509                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9510                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9511                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9512                         </actions>
9513                 </permacrud>
9514         </class>
9515
9516         <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">
9517                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9518                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9519                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9520                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9521                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9522                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9523                 </fields>
9524                 <links>
9525                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9526                 </links>
9527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9528                         <actions>
9529                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9530                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9531                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9532                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9533                         </actions>
9534                 </permacrud>
9535         </class>
9536
9537         <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">
9538                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9539                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9540                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
9541                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true" />
9542                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true" />
9543                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9544                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true" />
9545                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9546                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9547                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9548                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9549                 </fields>
9550                 <links>
9551                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9552                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9553             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9554             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9555                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9556                 </links>
9557         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9558             <actions>
9559                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9560                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9561                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9562                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9563             </actions>
9564         </permacrud>
9565         </class>
9566
9567         <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">
9568                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9569                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9570                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9571                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9572                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9573                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9574                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9575                 </fields>
9576                 <links>
9577                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9578                 </links>
9579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9580                         <actions>
9581                                 <create permission="ADMIN_FUNDING_SOURCE">
9582                     <context link="funding_source" field="owner"/>
9583                 </create>
9584                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9585                     <context link="funding_source" field="owner"/>
9586                 </retrieve>
9587                                 <update permission="ADMIN_FUNDING_SOURCE">
9588                     <context link="funding_source" field="owner"/>
9589                 </update>
9590                                 <delete permission="ADMIN_FUNDING_SOURCE">
9591                     <context link="funding_source" field="owner"/>
9592                 </delete>
9593                         </actions>
9594                 </permacrud>
9595         </class>
9596
9597         <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">
9598                 <fields oils_persist:primary="id">
9599                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9600                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9601                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9602                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9603                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9604                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9605                 </fields>
9606                 <links>
9607                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9608                 </links>
9609         </class>
9610
9611         <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">
9612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9613                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9614                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9615                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9616                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9617                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9618                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9619                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9620                         <field reporter:label="Debit Time" name="create_time" reporter:datatype="timestamp" />
9621                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9622                         <field reporter:label="Invoice Items" name="invoice_items" reporter:datatype="link" oils_persist:virtual="true"/>
9623                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9624                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9625                 </fields>
9626                 <links>
9627                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9628                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9629                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9630                         <link field="invoice_items" reltype="has_many" key="fund_debit" map="" class="acqii"/>
9631                         <link field="po_items" reltype="has_many" key="fund_debit" map="" class="acqpoi"/>
9632                         <link field="lineitem_details" reltype="has_many" key="fund_debit" map="" class="acqlid"/>
9633                 </links>
9634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9635                         <actions>
9636                                 <create permission="ADMIN_ACQ_FUND">
9637                     <context link="fund" field="org"/>
9638                 </create>
9639                                 <retrieve permission="ADMIN_ACQ_FUND">
9640                     <context link="fund" field="org"/>
9641                 </retrieve>
9642                                 <update permission="ADMIN_ACQ_FUND">
9643                     <context link="fund" field="org"/>
9644                 </update>
9645                                 <delete permission="ADMIN_ACQ_FUND">
9646                     <context link="fund" field="org"/>
9647                 </delete>
9648                         </actions>
9649                 </permacrud>
9650         </class>
9651
9652         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9653                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9654                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9655                         <field reporter:label="Owner" name="org" reporter:datatype="org_unit" oils_obj:required="true" />
9656                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
9657                         <field reporter:label="Year" name="year" reporter:datatype="int" oils_obj:required="true" />
9658                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" oils_obj:required="true" />
9659                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9660                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9661                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9662                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9663                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9664                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9665                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9666                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9667                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9668                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9669                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9670                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9671                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9672                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9673                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9674                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9675                 </fields>
9676                 <links>
9677                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9678                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9679             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9680             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9681             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9682             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9683             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9684             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9685             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9686             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9687             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9688                 </links>
9689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9690             <actions>
9691                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9692                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9693                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9694                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9695             </actions>
9696         </permacrud>
9697         </class>
9698
9699         <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">
9700                 <fields oils_persist:primary="fund">
9701                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9702                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9703                 </fields>
9704                 <links>
9705                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9706                 </links>
9707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9708             <actions>
9709                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9710                                         <context link="fund" field="org" />
9711                 </retrieve>
9712             </actions>
9713         </permacrud>
9714         </class>
9715
9716         <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">
9717                 <fields oils_persist:primary="fund">
9718                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9719                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9720                 </fields>
9721                 <links>
9722                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9723                 </links>
9724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9725             <actions>
9726                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9727                                         <context link="fund" field="org" />
9728                 </retrieve>
9729             </actions>
9730         </permacrud>
9731         </class>
9732
9733         <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">
9734                 <fields oils_persist:primary="fund">
9735                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9736                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9737                 </fields>
9738                 <links>
9739                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9740                 </links>
9741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9742             <actions>
9743                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9744                                         <context link="fund" field="org" />
9745                 </retrieve>
9746             </actions>
9747         </permacrud>
9748         </class>
9749
9750         <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">
9751                 <fields oils_persist:primary="fund">
9752                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9753                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9754                 </fields>
9755                 <links>
9756                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9757                 </links>
9758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9759             <actions>
9760                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9761                                         <context link="fund" field="org" />
9762                 </retrieve>
9763             </actions>
9764         </permacrud>
9765         </class>
9766
9767         <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">
9768                 <fields oils_persist:primary="fund">
9769                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9770                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9771                 </fields>
9772                 <links>
9773                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9774                 </links>
9775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9776             <actions>
9777                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9778                                         <context link="fund" field="org" />
9779                 </retrieve>
9780             </actions>
9781         </permacrud>
9782         </class>
9783
9784    <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">
9785         <fields oils_persist:primary="fund">
9786             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9787             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9788         </fields>
9789         <links>
9790             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9791         </links>
9792     </class>
9793
9794    <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">
9795         <fields oils_persist:primary="fund">
9796             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9797             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9798         </fields>
9799         <links>
9800             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9801         </links>
9802     </class>
9803
9804    <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">
9805         <fields oils_persist:primary="fund">
9806             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9807             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9808         </fields>
9809         <links>
9810             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9811         </links>
9812     </class>
9813
9814    <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">
9815         <fields oils_persist:primary="fund">
9816             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9817             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9818         </fields>
9819         <links>
9820             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9821         </links>
9822     </class>
9823
9824    <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">
9825         <fields oils_persist:primary="fund">
9826             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9827             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9828         </fields>
9829         <links>
9830             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9831         </links>
9832     </class>
9833
9834         <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">
9835                 <fields oils_persist:primary="funding_source">
9836                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9837                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9838                 </fields>
9839                 <links>
9840                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9841                 </links>
9842         </class>
9843
9844         <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">
9845                 <fields oils_persist:primary="funding_source">
9846                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9847                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9848                 </fields>
9849                 <links>
9850                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9851                 </links>
9852         </class>
9853
9854         <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">
9855                 <fields oils_persist:primary="funding_source">
9856                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9857                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9858                 </fields>
9859                 <links>
9860                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9861                 </links>
9862         </class>
9863
9864         <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">
9865                 <fields oils_persist:primary="fund">
9866                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9867                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9868                 </fields>
9869                 <links>
9870                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9871                 </links>
9872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9873             <actions>
9874                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9875                                         <context link="fund" field="org" />
9876                 </retrieve>
9877             </actions>
9878         </permacrud>
9879     </class>
9880     <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">
9881         <oils_persist:source_definition><![CDATA[
9882             SELECT
9883                 acqf.*,
9884                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9885                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9886                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9887                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9888             FROM
9889                 acq.fund acqf
9890                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9891                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9892                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9893                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9894         ]]></oils_persist:source_definition>
9895         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9896             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9897             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
9898             <field reporter:label="Name" name="name" reporter:datatype="text" />
9899             <field reporter:label="Year" name="year" reporter:datatype="int" />
9900             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9901             <field reporter:label="Code" name="code" reporter:datatype="text" />
9902             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9903             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9904             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9905             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9906             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9907
9908             <!-- non fund-native fields -->
9909             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9910             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9911             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9912             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9913         </fields>
9914         <links>
9915             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9916             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9917             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9918         </links>
9919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9920             <actions>
9921                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9922             </actions>
9923         </permacrud>
9924         </class>
9925         <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">
9926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9927                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9928                         <field reporter:label="Fund" name="fund" reporter:datatype="link" oils_obj:required="true" />
9929                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9930                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9931                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" oils_obj:required="true" />
9932                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9933                         <field reporter:label="Allocation Time" name="create_time" reporter:datatype="timestamp" />
9934                 </fields>
9935                 <links>
9936                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9937                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9938                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9939                 </links>
9940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9941                         <actions>
9942                                 <create permission="ADMIN_ACQ_FUND">
9943                     <context link="fund" field="org"/>
9944                 </create>
9945                                 <retrieve permission="ADMIN_ACQ_FUND">
9946                     <context link="fund" field="org"/>
9947                 </retrieve>
9948                                 <update permission="ADMIN_ACQ_FUND">
9949                     <context link="fund" field="org"/>
9950                 </update>
9951                                 <delete permission="ADMIN_ACQ_FUND">
9952                     <context link="fund" field="org"/>
9953                 </delete>
9954                         </actions>
9955                 </permacrud>
9956         </class>
9957
9958     <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">
9959         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9960             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9961             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9962             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
9963             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9964             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9965             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9966             <field reporter:label="Note" name="note" reporter:datatype="text" />
9967             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9968         </fields>
9969         <links>
9970             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9971             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9972             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9973         </links>
9974                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9975                         <actions>
9976                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9977                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9978                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9979                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9980                         </actions>
9981                 </permacrud>
9982     </class>
9983
9984         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9985                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9986                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9987                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9988                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9989                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9990                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9991                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9992                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9993                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9994                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9995                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9996                 </fields>
9997                 <links>
9998                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9999                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10000                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10001                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10002                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
10003                 </links>
10004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10005                         <actions>
10006                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
10007                         </actions>
10008                 </permacrud>
10009         </class>
10010
10011         <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">
10012                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
10013                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
10014                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
10015                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10016                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
10017                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
10018                 </fields>
10019                 <links>
10020                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10021                 </links>
10022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10023                         <actions>
10024                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10025                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
10026                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10027                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10028                         </actions>
10029                 </permacrud>
10030         </class>
10031
10032         <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">
10033                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
10034                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
10035                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10036                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10037                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10038                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10039                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10040                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
10041                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10042                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10043                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
10044                         <field reporter:label="Name" name="name" reporter:datatype="text" />
10045                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10046                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10047                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
10048                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
10049                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
10050                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
10051                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
10052                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
10053                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
10054                 </fields>
10055                 <links>
10056                         <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
10057                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10058                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10059                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10060                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
10061                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10062                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
10063                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
10064                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
10065                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10066                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10067                 </links>
10068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10069                         <actions>
10070                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10071                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10072                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10073                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10074                         </actions>
10075                 </permacrud>
10076         </class>
10077
10078         <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">
10079                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
10080                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10081                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10082                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10083                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10084                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10085                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10086                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10087                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10088                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10089                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10090                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10091                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10092                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
10093                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10094                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10095                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10096                 </fields>
10097                 <links>
10098                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10099                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10100                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10101                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10102                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10103                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10104                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10105                 </links>
10106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10107             <actions>
10108                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10109             </actions>
10110                 </permacrud>
10111         </class>
10112
10113         <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">
10114                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
10115                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
10116                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10117                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10118                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10119                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10120                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10121                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
10122                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10123                 </fields>
10124                 <links>
10125                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10126                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10127                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10128                 </links>
10129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10130             <actions>
10131                 <create permission="CREATE_PURCHASE_ORDER">
10132                     <context link="purchase_order" field="ordering_agency"/>
10133                 </create>
10134                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10135                     <context link="purchase_order" field="ordering_agency"/>
10136                 </retrieve>
10137                 <update permission="CREATE_PURCHASE_ORDER">
10138                     <context link="purchase_order" field="ordering_agency"/>
10139                 </update>
10140                 <delete permission="CREATE_PURCHASE_ORDER">
10141                     <context link="purchase_order" field="ordering_agency"/>
10142                 </delete>
10143             </actions>
10144                 </permacrud>
10145         </class>
10146
10147         <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">
10148                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
10149                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10150                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10151                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10152                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
10153                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
10154                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
10155                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10156                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
10157                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10158                         <field reporter:label="Target" name="target" reporter:datatype="int" />
10159                 </fields>
10160                 <links>
10161                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10162                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10163                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
10164                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10165                 </links>
10166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10167             <actions>
10168                 <create permission="CREATE_PURCHASE_ORDER">
10169                     <context link="purchase_order" field="ordering_agency"/>
10170                 </create>
10171                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10172                     <context link="purchase_order" field="ordering_agency"/>
10173                 </retrieve>
10174                 <update permission="CREATE_PURCHASE_ORDER">
10175                     <context link="purchase_order" field="ordering_agency"/>
10176                 </update>
10177                 <delete permission="CREATE_PURCHASE_ORDER">
10178                     <context link="purchase_order" field="ordering_agency"/>
10179                 </delete>
10180             </actions>
10181                 </permacrud>
10182         </class>
10183
10184         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
10185                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
10186                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
10187                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
10188                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
10189                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10190                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10191                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10192                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10193                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
10194                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
10195                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
10196                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
10197                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10198                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10199                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10200                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
10201                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10202                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10203                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10204                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
10205                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
10206                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
10207                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
10208                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
10209                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
10210                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
10211                 </fields>
10212                 <links>
10213                         <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
10214                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10215                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10216                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10217                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10218                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10219                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10220                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10221                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
10222                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
10223                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
10224                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10225                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
10226                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10227                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
10228                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
10229                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10230                 </links>
10231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10232                         <actions>
10233                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10234                                         <context link="purchase_order" field="ordering_agency"/>
10235                                         <context link="picklist" field="org_unit"/>
10236                                 </retrieve>
10237                         </actions>
10238                 </permacrud>
10239         </class>
10240
10241         <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">
10242                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
10243                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10244                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10245                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10246                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
10247                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10248                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10249                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
10250                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10251                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10252                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
10253                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
10254                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10255                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10256                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
10257                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
10258                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
10259                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10260                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
10261                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10262                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10263                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10264                 </fields>
10265                 <links>
10266                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
10267                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10268                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10269                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10270                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10271                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10272                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10273                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10274                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10275                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10276                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10277                 </links>
10278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10279                         <actions>
10280                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10281                                         <context link="purchase_order" field="ordering_agency"/>
10282                                         <context link="picklist" field="org_unit"/>
10283                                 </retrieve>
10284                         </actions>
10285                 </permacrud>
10286         </class>
10287
10288         <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">
10289                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
10290                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
10291                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10292                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10293                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10294                 </fields>
10295                 <links>
10296                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10297                 </links>
10298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10299                         <actions>
10300                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10301                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
10302                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10303                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10304                         </actions>
10305                 </permacrud>
10306         </class>
10307
10308         <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">
10309                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
10310                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
10311                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
10312                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10313                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10314                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10315                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10316                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
10317                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
10318                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10319                 </fields>
10320                 <links>
10321                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10322                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10323                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10324                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
10325                 </links>
10326         </class>
10327
10328         <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">
10329                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
10330                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
10331                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
10332                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
10333                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
10334                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
10335                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
10336                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
10337                 </fields>
10338                 <links>
10339                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10340                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
10341                 </links>
10342         </class>
10343
10344         <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">
10345                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
10346                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
10347                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
10348                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
10349                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
10350                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
10351                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
10352                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
10353                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
10354                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
10355                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10356                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
10357                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
10358                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10359                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
10360                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10361                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
10362                 </fields>
10363                 <links>
10364                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10365                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
10366                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10367                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10368                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10369                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10370                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10371                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10372                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
10373                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
10374                 </links>
10375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10376             <actions>
10377                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10378                     <context link="lineitem" jump="purchase_order" field="ordering_agency"/>
10379                     <context link="lineitem" jump="picklist" field="org_unit"/>
10380                 </retrieve>
10381             </actions>
10382         </permacrud>
10383         </class>
10384
10385         <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">
10386                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10387                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10388                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10389                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10390                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10391                 </fields>
10392                 <links/>
10393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10394                         <actions>
10395                                 <retrieve />
10396                         </actions>
10397                 </permacrud>
10398         </class>
10399
10400         <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">
10401                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10402                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10403                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10404                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10405                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10406                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10407             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10408                 </fields>
10409                 <links/>
10410         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10411             <actions>
10412                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10413                 <retrieve />
10414                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10415                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10416             </actions>
10417         </permacrud>
10418         </class>
10419
10420         <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">
10421                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10423                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10424                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10425                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10426                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10427                 </fields>
10428                 <links/>
10429         </class>
10430         <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">
10431                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10432                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10433                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10434                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10435                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10436                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10437                 </fields>
10438                 <links>
10439                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10440                 </links>
10441         </class>
10442
10443         <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">
10444             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10445                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10446                 <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true" />
10447                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
10448                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
10449                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10450                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10451         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10452
10453             </fields>
10454             <links>
10455                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10456             </links>
10457             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10458                 <actions>
10459                     <create permission="ADMIN_PROVIDER">
10460                         <context link="provider" field="owner"/>
10461                     </create>
10462                     <retrieve permission="ADMIN_PROVIDER">
10463                         <context link="provider" field="owner"/>
10464                     </retrieve>
10465                     <update permission="ADMIN_PROVIDER">
10466                         <context link="provider" field="owner"/>
10467                     </update>
10468                     <delete permission="ADMIN_PROVIDER">
10469                         <context link="provider" field="owner"/>
10470                     </delete>
10471                 </actions>
10472             </permacrud>
10473         </class>
10474         
10475         <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">
10476             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10477                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10478                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10479                 <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
10480                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
10481             </fields>
10482             <links>
10483                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10484             </links>
10485             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10486                 <actions>
10487                     <create permission="ADMIN_PROVIDER">
10488                         <context link="provider" field="owner"/>
10489                     </create>
10490                     <retrieve permission="ADMIN_PROVIDER">
10491                         <context link="provider" field="owner"/>
10492                     </retrieve>
10493                     <update permission="ADMIN_PROVIDER">
10494                         <context link="provider" field="owner"/>
10495                     </update>
10496                     <delete permission="ADMIN_PROVIDER">
10497                         <context link="provider" field="owner"/>
10498                     </delete>
10499                 </actions>
10500             </permacrud>
10501         </class>
10502         
10503         <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">
10504             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10505                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10506                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10507                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10508                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10509                 </fields>
10510                 <links/>
10511         </class>
10512
10513         <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">
10514                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10515                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10516                         <field name="label"         reporter:datatype="text"      reporter:label="Label" oils_obj:required="true"/>
10517                         <field name="host"          reporter:datatype="text"      reporter:label="Host" oils_obj:required="true"/>
10518                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10519                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10520                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10521                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10522                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner" oils_obj:required="true"/>
10523                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10524                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider" oils_obj:required="true"/>
10525                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10526                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10527                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10528                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10529                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes" oils_obj:required="true"/>
10530                 </fields>
10531                 <links>
10532                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10533                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10534                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10535                 </links>
10536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10537             <actions>
10538                 <create permission="ADMIN_PROVIDER">
10539                     <context link="provider" field="owner"/>
10540                 </create>
10541                 <retrieve permission="ADMIN_PROVIDER">
10542                     <context link="provider" field="owner"/>
10543                 </retrieve>
10544                 <update permission="ADMIN_PROVIDER">
10545                     <context link="provider" field="owner"/>
10546                 </update>
10547                 <delete permission="ADMIN_PROVIDER">
10548                     <context link="provider" field="owner"/>
10549                 </delete>
10550             </actions>
10551         </permacrud>
10552         </class>
10553
10554         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10555                 oils_obj:fieldmapper="acq::edi_attr" 
10556                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10557                 <fields oils_persist:primary="key">
10558                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10559                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10560                 </fields>
10561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10562             <actions>
10563                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10564                 <retrieve/>
10565                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10566                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10567             </actions>
10568         </permacrud>
10569         </class>
10570         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10571                 oils_obj:fieldmapper="acq::edi_attr_set" 
10572                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10574                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10575                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10576                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10577                         <field name="edi_accounts" reporter:datatype="link" oils_persist:virtual="true" reporter:label="EDI Accounts"/>
10578                 </fields>
10579                 <links>
10580                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10581                         <link field="edi_accounts" reltype="has_many" key="attr_set" map="" class="acqedi"/>
10582                 </links>
10583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10584             <actions>
10585                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10586                 <retrieve/>
10587                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10588                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10589             </actions>
10590         </permacrud>
10591         </class>
10592         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10593                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10594                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10595                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10596                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10597                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10598                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10599                 </fields>
10600                 <links>
10601                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10602                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10603                 </links>
10604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10605             <actions>
10606                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10607                 <retrieve/>
10608                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10609                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10610             </actions>
10611         </permacrud>
10612         </class>
10613
10614
10615         <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">
10616                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10617                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10618                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10619                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10620                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10621                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10622                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10623                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10624                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10625                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10626                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10627                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10628                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10629                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10630                 </fields>
10631                 <links>
10632                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10633                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10634                 </links>
10635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10636             <actions>
10637                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10638                     <context link="account" jump="provider" field="owner"/>
10639                 </retrieve>
10640                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10641                     <context link="account" jump="provider" field="owner"/>
10642                 </update>
10643                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10644                     <context link="account" jump="provider" field="owner"/>
10645                 </delete>
10646             </actions>
10647         </permacrud>
10648         </class>
10649
10650
10651         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10652                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10653                         <field name="id" reporter:datatype="id" />
10654                         <field name="parent" reporter:datatype="link"/>
10655                         <field name="owner" reporter:datatype="link"/>
10656                         <field name="create_time" reporter:datatype="timestamp"/>
10657                         <field name="name" reporter:datatype="text"/>
10658                         <field name="shared" reporter:datatype="bool"/>
10659                         <field name="share_with" reporter:datatype="link"/>
10660                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10661                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10662                 </fields>
10663                 <links>
10664                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10665                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10666                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10667                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10668                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10669                 </links>
10670         </class>
10671         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10672                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10673                         <field name="id" reporter:datatype="id" />
10674                         <field name="parent" reporter:datatype="link"/>
10675                         <field name="owner" reporter:datatype="link"/>
10676                         <field name="create_time" reporter:datatype="timestamp"/>
10677                         <field name="name" reporter:datatype="text"/>
10678                         <field name="shared" reporter:datatype="bool"/>
10679                         <field name="share_with" reporter:datatype="link"/>
10680                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10681                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10682                 </fields>
10683                 <links>
10684                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10685                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10686                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10687                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10688                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10689                 </links>
10690         </class>
10691         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10692                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10693                         <field name="id" reporter:datatype="id" />
10694                         <field name="parent" reporter:datatype="link"/>
10695                         <field name="owner" reporter:datatype="link"/>
10696                         <field name="create_time" reporter:datatype="timestamp"/>
10697                         <field name="name" reporter:datatype="text"/>
10698                         <field name="shared" reporter:datatype="bool"/>
10699                         <field name="share_with" reporter:datatype="link"/>
10700                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10701                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10702                 </fields>
10703                 <links>
10704                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10705                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10706                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10707                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10708                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10709                 </links>
10710         </class>
10711         <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">
10712                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10713                         <field name="id" reporter:datatype="id" />
10714                         <field name="owner" reporter:datatype="link"/>
10715                         <field name="create_time" reporter:datatype="timestamp"/>
10716                         <field name="name" reporter:datatype="text"/>
10717                         <field name="data" reporter:datatype="text"/>
10718                         <field name="folder" reporter:datatype="link"/>
10719                         <field name="description" reporter:datatype="text"/>
10720                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10721                 </fields>
10722                 <links>
10723                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10724                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10725                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10726                 </links>
10727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10728             <actions>
10729                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10730                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10731                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10732                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10733             </actions>
10734         </permacrud>
10735         </class>
10736         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10737                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10738                         <field name="id" reporter:datatype="id" />
10739                         <field name="owner" reporter:datatype="link"/>
10740                         <field name="create_time" reporter:datatype="timestamp"/>
10741                         <field name="template" reporter:datatype="link"/>
10742                         <field name="data" reporter:datatype="text"/>
10743                         <field name="folder" reporter:datatype="link"/>
10744                         <field name="recur" reporter:datatype="bool"/>
10745                         <field name="recurrence" reporter:datatype="interval"/>
10746                         <field name="name" reporter:datatype="text"/>
10747                         <field name="description" reporter:datatype="text"/>
10748                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10749                 </fields>
10750                 <links>
10751                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10752                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10753                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10754                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10755                 </links>
10756         </class>
10757         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10758                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10759                         <field name="id" reporter:datatype="id" />
10760                         <field name="runner" reporter:datatype="link"/>
10761                         <field name="start_time" reporter:datatype="timestamp"/>
10762                         <field name="complete_time" reporter:datatype="timestamp"/>
10763                         <field name="run_time" reporter:datatype="timestamp"/>
10764                         <field name="email" reporter:datatype="text"/>
10765                         <field name="excel_format" reporter:datatype="bool"/>
10766                         <field name="csv_format" reporter:datatype="bool"/>
10767                         <field name="html_format" reporter:datatype="bool"/>
10768                         <field name="error_code" reporter:datatype="int"/>
10769                         <field name="error_text" reporter:datatype="text"/>
10770                         <field name="report" reporter:datatype="link"/>
10771                         <field name="folder" reporter:datatype="link"/>
10772                         <field name="chart_pie" reporter:datatype="bool"/>
10773                         <field name="chart_bar" reporter:datatype="bool"/>
10774                         <field name="chart_line" reporter:datatype="bool"/>
10775                 </fields>
10776                 <links>
10777                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10778                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10779                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10780                 </links>
10781         </class>
10782         <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">
10783                 <fields oils_persist:primary="id">
10784                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10785                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10786                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10787                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10788                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10789                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10790                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10791                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10792                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10793                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10794                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10795                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10796                 </fields>
10797                 <links>
10798                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10799                 </links>
10800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10801                         <actions>
10802                                 <retrieve />
10803                         </actions>
10804                 </permacrud>
10805         </class>
10806         <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">
10807                 <fields oils_persist:primary="id">
10808                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10809                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10810                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10811                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10812                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10813                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10814                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10815                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10816                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10817                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10818                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10819                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10820                 </fields>
10821                 <links>
10822                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10823                 </links>
10824         </class>
10825         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10826                 <fields oils_persist:primary="id">
10827                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10828                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10829                         <field reporter:label="Fingerprint" name="fingerprint" />
10830                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10831                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10832                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10833                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10834                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10835                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10836                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10837                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10838                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10839                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10840                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10841                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10842                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10843                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10844                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10845                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10846                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10847                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10848                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10849                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10850                 </fields>
10851                 <links>
10852                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10853                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10854                 </links>
10855         </class>
10856         <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">
10857                 <fields oils_persist:primary="id">
10858                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10859                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10860                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10861                 </fields>
10862                 <links>
10863                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10864                 </links>
10865         </class>
10866         <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">
10867                 <fields oils_persist:primary="id">
10868                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10869                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10870                 </fields>
10871                 <links>
10872                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10873                 </links>
10874         </class>
10875         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
10876                 <fields oils_persist:primary="id">
10877                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10878                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10879                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10880                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10881                 </fields>
10882                 <links>
10883                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10884                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10885                 </links>
10886         </class>
10887         <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">
10888                 <fields oils_persist:primary="xact">
10889                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10890                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10891                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10892                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10893                 </fields>
10894                 <links>
10895                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10896                 </links>
10897         </class>
10898         <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">
10899                 <fields oils_persist:primary="xact">
10900                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10901                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10902                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10903                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10904                 </fields>
10905                 <links>
10906                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10907                 </links>
10908         </class>
10909         <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)">
10910                 <fields oils_persist:primary="id">
10911                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10912                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10913                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10914                 </fields>
10915                 <links>
10916                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10917                 </links>
10918         </class>
10919         <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">
10920                 <fields oils_persist:primary="id">
10921                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10922                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10923                 </fields>
10924                 <links>
10925                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10926                 </links>
10927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10928                         <actions>
10929                                 <retrieve permission="STAFF_LOGIN">
10930                                         <context link="id" field="circ_lib"/>
10931                                 </retrieve>
10932                         </actions>
10933                 </permacrud>
10934         </class>
10935         <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">
10936                 <fields oils_persist:primary="bibid">
10937                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10938                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10939                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10940                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10941                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10942                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10943                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10944                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10945                 </fields>
10946                 <links>
10947                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10948                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10949                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10950                 </links>
10951         </class>
10952         <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">
10953                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10954                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10955                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10956                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10957                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10958                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10959                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10960                 </fields>
10961                 <links>
10962                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10963                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10964                 </links>
10965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10966                         <actions>
10967                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10968                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10969                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10970                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10971                         </actions>
10972                 </permacrud>
10973         </class>
10974         <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">
10975                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10976                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10977                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10978                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10979                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10980                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10981                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10982                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10983                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10984                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10985                 </fields>
10986                 <links>
10987                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10988                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10989                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10990                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10991                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10992                 </links>
10993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10994                         <actions>
10995                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10996                                         <context link="formula" field="owner"/>
10997                                 </create>
10998                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10999                                         <context link="formula" field="owner"/>
11000                                 </retrieve>
11001                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
11002                                         <context link="formula" field="owner"/>
11003                                 </update>
11004                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
11005                                         <context link="formula" field="owner"/>
11006                                 </delete>
11007                         </actions>
11008                 </permacrud>
11009         </class>
11010
11011         <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">
11012                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
11013                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11014                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11015                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11016                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
11017                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11018                 </fields>
11019                 <links>
11020                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11021                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11022                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11023                 </links>
11024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11025                         <actions>
11026                                 <create permission="CREATE_PURCHASE_ORDER">
11027                                         <context link="formula" field="owner"/>
11028                 </create>
11029                                 <retrieve permission="CREATE_PURCHASE_ORDER">
11030                                         <context link="formula" field="owner"/>
11031                 </retrieve>
11032                                 <update permission="CREATE_PURCHASE_ORDER">
11033                                         <context link="formula" field="owner"/>
11034                 </update>
11035                                 <delete permission="CREATE_PURCHASE_ORDER">
11036                                         <context link="formula" field="owner"/>
11037                 </delete>
11038                         </actions>
11039                 </permacrud>
11040         </class>
11041
11042         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
11043                 <fields oils_persist:primary="id">
11044                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
11045                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
11046                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
11047                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
11048                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
11049                 </fields>
11050                 <links>
11051                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
11052                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
11053                 </links>
11054         </class>
11055
11056         <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">
11057                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
11058                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11059                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11060                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11061                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11062                 </fields>
11063                 <links>
11064                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11065                 </links>
11066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11067                         <actions>
11068                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11069                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11070                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11071                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11072                         </actions>
11073                 </permacrud>
11074         </class>
11075
11076         <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">
11077                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
11078                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11079                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11080                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11081                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11082                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
11083                 </fields>
11084                 <links>
11085                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11086                 </links>
11087                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11088                         <actions>
11089                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11090                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11091                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11092                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11093                         </actions>
11094                 </permacrud>
11095         </class>
11096
11097         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
11098                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
11099                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11100                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11101                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11102                 </fields>
11103                 <links>
11104                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11105                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11106                 </links>
11107         </class>
11108
11109         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
11110                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
11111                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11112                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11113                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11114                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11115                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11116                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11117                 </fields>
11118                 <links>
11119                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11120                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
11121                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11122                 </links>
11123         </class>
11124
11125         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
11126                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
11127                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11128                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11129                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
11130                 </fields>
11131                 <links>
11132                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11133                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
11134                 </links>
11135         </class>
11136
11137         <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">
11138                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
11139                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11140                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11141                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11142                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11143                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11144                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11145                 </fields>
11146                 <links>
11147                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11148                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
11149                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11150                 </links>
11151         </class>
11152
11153         <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">
11154                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
11155                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
11156                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11157                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
11158                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11159                 </fields>
11160                 <links>
11161                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11162                 </links>
11163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11164             <actions>
11165                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11166                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
11167                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11168                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11169             </actions>
11170                 </permacrud>
11171         </class>
11172
11173         <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">
11174                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
11175                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
11176                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
11177                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
11178                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
11179                 </fields>
11180                 <links>
11181                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
11182                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
11183                 </links>
11184                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11185                         <actions>
11186                                 <create permission="ADMIN_CLAIM_POLICY">
11187                                         <context link="claim_policy" field="org_unit"/>
11188                 </create>
11189                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
11190                                         <context link="claim_policy" field="org_unit"/>
11191                 </retrieve>
11192                                 <update permission="ADMIN_CLAIM_POLICY">
11193                                         <context link="claim_policy" field="org_unit"/>
11194                 </update>
11195                                 <delete permission="ADMIN_CLAIM_POLICY">
11196                                         <context link="claim_policy" field="org_unit"/>
11197                 </delete>
11198                         </actions>
11199                 </permacrud>
11200         </class>
11201
11202     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
11203         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
11204             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11205             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
11206             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11207             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
11208             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
11209             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
11210             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
11211             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
11212             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
11213             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
11214             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
11215             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
11216             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
11217             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
11218             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11219             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
11220                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
11221                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
11222                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
11223         </fields>
11224         <links>
11225             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
11226             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11227         </links>
11228     </class>
11229
11230     <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">
11231         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
11232             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11233             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11234             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11235             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11236             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11237         </fields>
11238     </class>
11239
11240     <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">
11241         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11242             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11243             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11244             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11245             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11246             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11247             <field reporter:label="City" name="city" reporter:datatype="text"/>
11248             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11249             <field reporter:label="State" name="state" reporter:datatype="text"/>
11250             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11251             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11252             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11253         </fields>
11254     </class>
11255
11256     <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">
11257         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11258             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11259             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11260             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11261             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11262             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11263             <field reporter:label="City" name="city" reporter:datatype="text"/>
11264             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11265             <field reporter:label="State" name="state" reporter:datatype="text"/>
11266             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11267             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11268             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11269         </fields>
11270     </class>
11271
11272     <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">
11273         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
11274             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11275             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11276             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11277             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
11278             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
11279             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11280         </fields>
11281     </class>
11282
11283     <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">
11284         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
11285             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11286             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11287             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11288             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
11289             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
11290             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11291         </fields>
11292     </class>
11293
11294         <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">
11295                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
11296                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
11297                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11298                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
11299                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
11300                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
11301                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
11302                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
11303                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
11304                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11305                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11306                 </fields>
11307                 <links>
11308                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11309                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11310                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
11311                 </links>
11312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11313                         <actions>
11314                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11315                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11316                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11317                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11318                         </actions>
11319                 </permacrud>
11320         </class>
11321
11322         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
11323                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
11324                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
11325                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
11326                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
11327                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
11328                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
11329                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
11330                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
11331                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
11332                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
11333                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
11334                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
11335                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
11336                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
11337                 </fields>
11338                 <links>
11339                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
11340                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11341                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11342                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
11343                 </links>
11344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11345                         <actions>
11346                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11347                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11348                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11349                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11350                         </actions>
11351                 </permacrud>
11352         </class>
11353
11354         <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">
11355                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
11356                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
11357                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
11358                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
11359                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
11360                 </fields>
11361                 <links>
11362                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
11363                 </links>
11364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
11365                         <actions>
11366                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11367                     <context link="fieldset" field="owning_lib"/>
11368                 </create>
11369                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11370                     <context link="fieldset" field="owning_lib"/>
11371                 </retrieve>
11372                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11373                     <context link="fieldset" field="owning_lib"/>
11374                 </update>
11375                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11376                     <context link="fieldset" field="owning_lib"/>
11377                 </delete>
11378                         </actions>
11379                 </permacrud>
11380         </class>
11381
11382     <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">
11383         <fields>
11384             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11385             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11386             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11387         </fields>
11388                 <links>
11389                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11390                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11391                 </links>
11392     </class>
11393
11394     <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">
11395         <fields>
11396             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11397             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11398         </fields>
11399                 <links>
11400                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11401                 </links>
11402     </class>
11403
11404     <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">
11405         <fields>
11406             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11407             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11408             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11409         </fields>
11410                 <links>
11411                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11412                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11413                 </links>
11414     </class>
11415
11416     <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">
11417         <fields>
11418             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11419             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11420         </fields>
11421                 <links>
11422                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11423                 </links>
11424     </class>
11425
11426     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11427                 <oils_persist:source_definition><![CDATA[
11428
11429             SELECT  DISTINCT l.*
11430               FROM  action.unfulfilled_hold_loops l
11431                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11432               WHERE l.count = m.max
11433
11434                 ]]></oils_persist:source_definition>
11435         <fields>
11436             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11437             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11438             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11439         </fields>
11440                 <links>
11441                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11442                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11443                 </links>
11444     </class>
11445
11446         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11447                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11448                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11449                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11450                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11451                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11452                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11453                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11454                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11455                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11456                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11457                 </fields>
11458                 <links>
11459                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11460                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11461                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11462                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11463                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11464                 </links>
11465         </class>
11466
11467         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11468                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11469                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11470                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11471                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11472                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11473                 </fields>
11474                 <links>
11475                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11476                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11477                 </links>
11478         </class>
11479
11480         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11481                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11482                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11483                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11484                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11485                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11486                 </fields>
11487                 <links>
11488                 </links>
11489         </class>
11490
11491         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11492                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11493                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11494                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11495                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11496                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11497                 </fields>
11498                 <links>
11499                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11500                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11501                 </links>
11502         </class>
11503         
11504         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11505                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11506                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11507                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11508                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11509                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11510                 </fields>
11511                 <links>
11512                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11513                 </links>
11514         </class>
11515         
11516         <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">
11517                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11518                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11519                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11520                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11521                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11522                 </fields>
11523                 <links>
11524                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11525                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11526                 </links>
11527         </class>
11528
11529         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11530                 <fields oils_persist:primary="name">
11531                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11532                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11533                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11534                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11535                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11536                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11537                 </fields>
11538                 <links>
11539                 </links>
11540         </class>
11541
11542         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11543                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11544                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11545                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11546                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11547                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11548                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11549                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11550                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11551                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11552                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11553                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11554                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11555                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11556                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11557                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11558                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11559                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11560                 </fields>
11561                 <links>
11562                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11563                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11564                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11565                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11566                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11567                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11568                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11569                 </links>
11570         </class>
11571
11572         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11573                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11574                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11575                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11576                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11577                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11578                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11579                 </fields>
11580                 <links>
11581                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11582                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11583                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11584                 </links>
11585         </class>
11586
11587         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11588                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11589                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11590                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11591                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11592                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11593                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11594                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11595                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11596                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11597                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11598                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11599                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11600                 </fields>
11601                 <links>
11602                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11603                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11604                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11605                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11606                 </links>
11607         </class>
11608
11609         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11610                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11611                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11612                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11613                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11614                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11615                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11616                 </fields>
11617                 <links>
11618                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11619                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11620                 </links>
11621         </class>
11622
11623         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11624                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11625                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11626                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11627                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11628                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11629                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11630                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11631                 </fields>
11632                 <links>
11633                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11634                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11635                 </links>
11636         </class>
11637
11638         <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">
11639                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11640                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11641                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11642                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11643                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11644                 </fields>
11645                 <links>
11646                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11647                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11648                 </links>
11649         </class>
11650
11651         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11652                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11653                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11654                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11655                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11656                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11657                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11658                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11659                 </fields>
11660                 <links>
11661                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11662                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11663                 </links>
11664         </class>
11665
11666         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11667                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11668                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11669                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11670                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11671                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11672                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11673                 </fields>
11674                 <links>
11675                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11676                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11677                 </links>
11678         </class>
11679
11680         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11681                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11682                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11683                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11684                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11685                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11686                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11687                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11688                 </fields>
11689                 <links>
11690                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11691                 </links>
11692         </class>
11693
11694         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11695                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11696                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11697                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11698                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11699                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11700                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11701                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11702                 </fields>
11703                 <links>
11704                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11705                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11706                 </links>
11707         </class>
11708
11709         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11710                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11711                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11712                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11713                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11714                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11715                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11716                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11717                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11718                 </fields>
11719                 <links>
11720                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11721                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11722                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11723                 </links>
11724         </class>
11725
11726         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11727                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11728                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11729                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11730                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11731                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11732                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11733                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11734                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11735                 </fields>
11736                 <links>
11737                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11738                 </links>
11739         </class>
11740
11741         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11742                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11743                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11744                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11745                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11746                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11747                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11748                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11749                 </fields>
11750                 <links>
11751                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11752                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11753                 </links>
11754         </class>
11755
11756         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11757                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11758                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11759                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11760                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11761                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11762                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11763                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11764                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11765                 </fields>
11766                 <links>
11767                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11768                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11769                 </links>
11770         </class>
11771
11772         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11773                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11774                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11775                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11776                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11777                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11778                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11779                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11780                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11781                 </fields>
11782                 <links>
11783                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11784                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11785                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11786                 </links>
11787         </class>
11788
11789         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11790                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11791                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11792                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11793                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11794                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11795                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11796                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11797                 </fields>
11798                 <links>
11799                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11800                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11801                 </links>
11802         </class>
11803
11804         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11805                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11806                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11807                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11808                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11809                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11810                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11811                 </fields>
11812                 <links>
11813                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11814                 </links>
11815         </class>
11816
11817         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11818                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11819                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11820                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11821                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11822                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11823                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11824                 </fields>
11825                 <links>
11826                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11827                 </links>
11828         </class>
11829
11830         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11831                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11832                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11833                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11834                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11835                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11836                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11837                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11838                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11839                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11840                 </fields>
11841                 <links>
11842                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11843                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11844                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11845                 </links>
11846         </class>
11847
11848         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11849                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11850                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11851                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11852                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11853                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11854                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11855                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11856                 </fields>
11857                 <links>
11858                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11859                 </links>
11860         </class>
11861
11862         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11863                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11864                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11865                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11866                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11867                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11868                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11869                 </fields>
11870                 <links>
11871                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11872                 </links>
11873         </class>
11874
11875         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11876                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11877                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11878                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11879                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11880                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11881                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11882                 </fields>
11883                 <links>
11884                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11885                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11886                 </links>
11887         </class>
11888
11889         <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">
11890                 <fields oils_persist:primary="id">
11891                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11892                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11893                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11894                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11895                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11896                 </fields>
11897                 <links>
11898                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11899                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11900                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11901                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11902                 </links>
11903         </class>
11904
11905         <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">
11906                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11907                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11908                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11909                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11910                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11911                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11912                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11913                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11914                 </fields>
11915                 <links/>
11916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11917                         <actions>
11918                                 <retrieve/>
11919                         </actions>
11920                 </permacrud>
11921         </class>
11922
11923         <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">
11924                 <fields oils_persist:primary="ptype_key">
11925                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11926                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11927                 </fields>
11928                 <links/>
11929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11930                         <actions>
11931                                 <retrieve/>
11932                         </actions>
11933                 </permacrud>
11934         </class>
11935
11936         <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">
11937                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11938                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11939                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11940                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11941                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11942                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11943                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11944                 </fields>
11945                 <links>
11946                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11947                 </links>
11948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11949                         <actions>
11950                                 <retrieve/>
11951                         </actions>
11952                 </permacrud>
11953         </class>
11954
11955         <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">
11956                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11957                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11958                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11959                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11960                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11961                 </fields>
11962                 <links>
11963                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11964                 </links>
11965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11966                         <actions>
11967                                 <retrieve/>
11968                         </actions>
11969                 </permacrud>
11970         </class>
11971
11972     <class
11973         id="uvs"
11974         controller="open-ils.cstore open-ils.pcrud"
11975         oils_obj:fieldmapper="url_verify::session"
11976         oils_persist:tablename="url_verify.session"
11977         reporter:label="URL Verification Session"
11978     >
11979         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11980             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11981             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11982                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11983             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11984             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11985             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11986             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11987             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11988             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11989         </fields>
11990
11991         <links>
11992             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11993             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11994             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11995             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11996             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11997         </links>
11998
11999         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12000             <actions>
12001                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
12002             </actions>
12003         </permacrud>
12004
12005     </class>
12006
12007     <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">
12008         <oils_persist:source_definition><![CDATA[
12009             SELECT
12010                 cbrebi.id AS id,  -- so we can have a pkey in our view
12011                 uvs.id AS session,
12012                 uvs.owning_lib,
12013                 cbrebi.target_biblio_record_entry
12014             FROM url_verify.session uvs
12015             JOIN container.biblio_record_entry_bucket cbreb
12016                 ON (uvs.container = cbreb.id)
12017             JOIN container.biblio_record_entry_bucket_item cbrebi
12018                 ON (cbrebi.bucket = cbreb.id)
12019         ]]></oils_persist:source_definition>
12020         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
12021             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
12022             <field reporter:label="Session" name="session" reporter:datatype="link" />
12023             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
12024             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
12025         </fields>
12026         <links>
12027             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
12028             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
12029             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
12030         </links>
12031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12032             <actions>
12033                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
12034             </actions>
12035         </permacrud>
12036     </class>
12037
12038     <class
12039         id="uvus"
12040         controller="open-ils.cstore open-ils.pcrud"
12041         oils_obj:fieldmapper="url_verify::url_selector"
12042         oils_persist:tablename="url_verify.url_selector"
12043         reporter:label="URL Verification URL Selector"
12044     >
12045         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
12046             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
12047             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
12048                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12049             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
12050         </fields>
12051
12052         <links>
12053             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12054             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
12055         </links>
12056
12057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12058             <actions>
12059                 <create permission="URL_VERIFY">
12060                     <context link="session" field="owning_lib"/>
12061                 </create>
12062                 <retrieve permission="URL_VERIFY">
12063                     <context link="session" field="owning_lib"/>
12064                 </retrieve>
12065                 <update permission="URL_VERIFY">
12066                     <context link="session" field="owning_lib"/>
12067                 </update>
12068                 <delete permission="URL_VERIFY">
12069                     <context link="session" field="owning_lib"/>
12070                 </delete>
12071             </actions>
12072         </permacrud>
12073
12074     </class>
12075
12076     <class
12077         id="uvu"
12078         controller="open-ils.cstore open-ils.pcrud"
12079         oils_obj:fieldmapper="url_verify::url"
12080         oils_persist:tablename="url_verify.url"
12081         reporter:label="URL Verification URL"
12082     >
12083         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
12084             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
12085                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
12086                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
12087                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12088                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
12089             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12090             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12091             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
12092             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
12093             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
12094             <field reporter:label="Host" name="host" reporter:datatype="text"/>
12095             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
12096             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
12097             <field reporter:label="Path" name="path" reporter:datatype="text"/>
12098             <field reporter:label="Page" name="page" reporter:datatype="text"/>
12099             <field reporter:label="Query" name="query" reporter:datatype="text"/>
12100             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
12101             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
12102         </fields>
12103
12104         <links>
12105             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
12106             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
12107             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12108             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
12109             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
12110         </links>
12111
12112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12113             <actions>
12114                 <create permission="URL_VERIFY">
12115                     <context link="session" field="owning_lib"/>
12116                 </create>
12117                 <retrieve permission="URL_VERIFY">
12118                     <context link="session" field="owning_lib"/>
12119                 </retrieve>
12120                 <update permission="URL_VERIFY">
12121                     <context link="session" field="owning_lib"/>
12122                 </update>
12123                 <delete permission="URL_VERIFY">
12124                     <context link="session" field="owning_lib"/>
12125                 </delete>
12126             </actions>
12127         </permacrud>
12128
12129     </class>
12130
12131     <class
12132         id="uvva"
12133         controller="open-ils.cstore open-ils.pcrud"
12134         oils_obj:fieldmapper="url_verify::verification_attempt"
12135         oils_persist:tablename="url_verify.verification_attempt"
12136         reporter:label="URL Verification Attempt"
12137     >
12138         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
12139             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
12140                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
12141                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
12142             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
12143             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
12144         </fields>
12145
12146         <links>
12147             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12148             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12149         </links>
12150
12151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12152             <actions>
12153                 <create permission="URL_VERIFY">
12154                     <context link="session" field="owning_lib"/>
12155                 </create>
12156                 <retrieve permission="URL_VERIFY">
12157                     <context link="session" field="owning_lib"/>
12158                 </retrieve>
12159                 <update permission="URL_VERIFY">
12160                     <context link="session" field="owning_lib"/>
12161                 </update>
12162                 <delete permission="URL_VERIFY">
12163                     <context link="session" field="owning_lib"/>
12164                 </delete>
12165             </actions>
12166         </permacrud>
12167
12168     </class>
12169
12170     <class
12171         id="uvuv"
12172         controller="open-ils.cstore open-ils.pcrud"
12173         oils_obj:fieldmapper="url_verify::url_verification"
12174         oils_persist:tablename="url_verify.url_verification"
12175         reporter:label="URL Verification"
12176     >
12177         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
12178             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
12179                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
12180                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
12181             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
12182             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
12183             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
12184             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
12185                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
12186         </fields>
12187
12188         <links>
12189             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
12190             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
12191             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
12192         </links>
12193
12194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12195             <actions>
12196                 <create permission="URL_VERIFY">
12197                     <context link="attempt" jump="session" field="owning_lib"/>
12198                 </create>
12199                 <retrieve permission="URL_VERIFY">
12200                     <context link="attempt" jump="session" field="owning_lib"/>
12201                 </retrieve>
12202                 <update permission="URL_VERIFY">
12203                     <context link="attempt" jump="session" field="owning_lib"/>
12204                 </update>
12205                 <delete permission="URL_VERIFY">
12206                     <context link="attempt" jump="session" field="owning_lib"/>
12207                 </delete>
12208             </actions>
12209         </permacrud>
12210
12211     </class>
12212
12213         <class
12214                 id="cfdi"
12215                 controller="open-ils.cstore open-ils.pcrud"
12216                 oils_obj:fieldmapper="config::filter_dialog_interface"
12217                 oils_persist:tablename="config.filter_dialog_interface"
12218                 reporter:label="FilterDialog Interface">
12219                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
12220                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
12221                         <field reporter:label="Description" name="description" reporter:datatype="text" />
12222                 </fields>
12223                 <links>
12224                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
12225                 </links>
12226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12227                         <actions>
12228                                 <retrieve />
12229                         </actions>
12230                 </permacrud>
12231         </class>
12232
12233         <class
12234                 id="cfdfs"
12235                 controller="open-ils.cstore open-ils.pcrud"
12236                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
12237                 oils_persist:tablename="config.filter_dialog_filter_set"
12238                 reporter:label="FilterDialog Filter Set">
12239                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
12240                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12241                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12242                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12243                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12244                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
12245                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12246                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
12247                 </fields>
12248                 <links>
12249                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12250                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12251                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
12252                 </links>
12253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12254                         <actions>
12255                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12256                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12257                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12258                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12259                         </actions>
12260                 </permacrud>
12261
12262         </class>
12263
12264         <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">
12265                 <fields oils_persist:primary="code">
12266                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
12267                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
12268                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
12269                 </fields>
12270                 <links/>
12271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12272                         <actions>
12273                                 <retrieve/>
12274                         </actions>
12275                 </permacrud>
12276         </class>
12277
12278         <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">
12279                 <oils_persist:source_definition><![CDATA[
12280
12281             SELECT  b.id,
12282                     MAX(dcp.edit_date) AS last_delete_date
12283              FROM   biblio.record_entry b
12284                     JOIN asset.call_number cn ON (cn.record = b.id)
12285                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
12286              WHERE  NOT b.deleted
12287              GROUP BY b.id
12288              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
12289
12290                 ]]></oils_persist:source_definition>
12291                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12292                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12293                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
12294                 </fields>
12295                 <links>
12296                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12297                 </links>
12298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12299                         <actions>
12300                                 <retrieve/>
12301                         </actions>
12302                 </permacrud>
12303         </class>
12304
12305         <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">
12306                 <fields oils_persist:primary="id">
12307                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12308                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12309                 </fields>
12310                 <links/>
12311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12312                         <actions>
12313                                 <retrieve/>
12314                         </actions>
12315                 </permacrud>
12316         </class>
12317
12318         <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">
12319                 <fields oils_persist:primary="id">
12320                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12321                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12322                 </fields>
12323                 <links/>
12324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12325                         <actions>
12326                                 <retrieve/>
12327                         </actions>
12328                 </permacrud>
12329         </class>
12330
12331
12332         <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">
12333                 <oils_persist:source_definition><![CDATA[
12334
12335             -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
12336             -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
12337             -- -- may not.
12338             -- SELECT
12339             --     bre.id AS bib_id,
12340             --     COALESCE( z.copy_count, 0 ) AS copy_count,
12341             --     COALESCE( z.hold_count, 0 ) AS hold_count,
12342             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
12343             -- FROM (
12344                 SELECT
12345                     y.bre AS id,
12346                     COALESCE( x.copy_count, 0 ) AS copy_count,
12347                     y.hold_count AS hold_count,
12348                     (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS hold_copy_ratio
12349                 FROM (
12350                         SELECT
12351                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
12352                             COUNT(*) AS hold_count
12353                         FROM action.hold_request h
12354                         WHERE
12355                             cancel_time IS NULL
12356                             AND fulfillment_time IS NULL
12357                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
12358                         GROUP BY 1
12359                     )y LEFT JOIN (
12360                         SELECT 
12361                             (SELECT id
12362                                 FROM biblio.record_entry 
12363                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
12364                             ) AS bre, 
12365                             COUNT(*) AS copy_count
12366                         FROM asset.copy
12367                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
12368                         WHERE copy.holdable 
12369                             AND NOT copy.deleted 
12370                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
12371                         GROUP BY 1
12372                     )x ON x.bre = y.bre
12373                 -- )z RIGHT JOIN (
12374                 --     SELECT id
12375                 --     FROM biblio.record_entry
12376                 --     WHERE NOT deleted
12377                 -- )bre ON (z.bib_id = bre.id)
12378                 
12379
12380                 ]]></oils_persist:source_definition>
12381                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12382                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12383                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
12384                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
12385                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
12386                 </fields>
12387                 <links>
12388                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12389                 </links>
12390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12391                         <actions>
12392                                 <retrieve/>
12393                         </actions>
12394                 </permacrud>
12395         </class>
12396
12397         <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">
12398                 <oils_persist:source_definition><![CDATA[
12399             SELECT *,
12400                 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,
12401                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12402             FROM
12403                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
12404                     FROM
12405                         action.hold_request ahr
12406                         JOIN reporter.hold_request_record rhrr USING (id)
12407                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12408                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12409                     WHERE
12410                         ahr.cancel_time IS NULL
12411                         AND ahr.fulfillment_time IS NULL
12412                     GROUP BY bib_record, pickup_lib
12413                 )x
12414                 JOIN
12415                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12416                     FROM
12417                         action.hold_request ahr
12418                         JOIN reporter.hold_request_record rhrr USING (id)
12419                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12420                     WHERE
12421                         ahr.cancel_time IS NULL
12422                         AND ahr.fulfillment_time IS NULL
12423                     GROUP BY bib_record
12424                 )y
12425                 USING (id)
12426                 ]]></oils_persist:source_definition>
12427                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12428                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12429                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12430                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12431                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12432                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12433                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12434                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12435                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12436                 </fields>
12437                 <links>
12438                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12439                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12440                 </links>
12441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12442                         <actions>
12443                                 <retrieve/>
12444                         </actions>
12445                 </permacrud>
12446         </class>
12447
12448         <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) ">
12449                 <oils_persist:source_definition><![CDATA[
12450             WITH counts_at_ou AS (
12451                 SELECT  rhrr.bib_record AS id,
12452                         aou.id AS pickup_lib_or_desc,
12453                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
12454                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
12455                   FROM  actor.org_unit aou
12456                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12457                         action.hold_request ahr
12458                         JOIN reporter.hold_request_record rhrr USING (id)
12459                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12460                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12461                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12462                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12463                         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
12464                   GROUP BY 1, 2
12465             )
12466             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12467                    y.holds_everywhere, y.copy_count_everywhere,
12468                 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,
12469                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12470             FROM counts_at_ou x
12471                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12472                     FROM
12473                         action.hold_request ahr
12474                         JOIN reporter.hold_request_record rhrr USING (id)
12475                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12476                     WHERE
12477                         ahr.cancel_time IS NULL
12478                         AND ahr.fulfillment_time IS NULL
12479                     GROUP BY bib_record
12480                 )y
12481                 USING (id)
12482                 ]]></oils_persist:source_definition>
12483                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12484                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12485                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12486                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12487                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12488                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12489                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12490                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12491                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12492                 </fields>
12493                 <links>
12494                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12495                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12496                 </links>
12497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12498                         <actions>
12499                                 <retrieve/>
12500                         </actions>
12501                 </permacrud>
12502         </class>
12503
12504         <class id="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">
12505                 <oils_persist:source_definition><![CDATA[
12506             SELECT
12507                 ac.id,
12508                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12509                 MAX(actac.xact_start) AS last_circ
12510             FROM asset.copy ac
12511                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12512             GROUP BY ac.id
12513
12514             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12515             --SELECT
12516             --    ac.id,
12517             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12518             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12519             --FROM asset.copy ac
12520             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12521             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12522             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12523                 ]]></oils_persist:source_definition>
12524                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12525                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12526                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12527                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12528                 </fields>
12529                 <links>
12530                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12531                 </links>
12532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12533                         <actions>
12534                                 <retrieve/>
12535                         </actions>
12536                 </permacrud>
12537         </class>
12538
12539         <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">
12540                 <fields oils_persist:primary="id">
12541                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12542                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12543                 </fields>
12544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12545                         <actions>
12546                                 <retrieve/>
12547                         </actions>
12548                 </permacrud>
12549         </class>
12550
12551         <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">
12552                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12553                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12554                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12555                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12556                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12557                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12558                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12559                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12560                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12561                 </fields>
12562                 <links>
12563                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12564                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12565                 </links>
12566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12567                         <actions>
12568                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12569                                 <retrieve/>
12570                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12571                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12572                         </actions>
12573                 </permacrud>
12574         </class>
12575
12576         <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">
12577                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12578                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12579                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12580                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12581                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12582                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12583                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12584                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12585                 </fields>
12586                 <links>
12587                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12588                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12589                 </links>
12590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12591                         <actions>
12592                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12593                                 <retrieve/>
12594                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12595                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12596                         </actions>
12597                 </permacrud>
12598         </class>
12599
12600
12601         <!-- ********************************************************************************************************************* -->
12602         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12603         <!-- ********************************************************************************************************************* -->
12604         <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">
12605                 <fields oils_persist:primary="id">
12606                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12607                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12608                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12609                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12610                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12611                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12612                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12613                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12614                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12615                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12616                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12617                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12618                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12619                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12620                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12621                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12622                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12623                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12624                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12625                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12626                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12627                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12628                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12629                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12630                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12631                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12632                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12633                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12634                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12635                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12636                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12637                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12638                 </fields>
12639                 <links>
12640                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12641                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12642                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12643                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12644                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12645                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12646                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12647                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12648                 </links>
12649         </class>
12650
12651         <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">
12652                 <fields oils_persist:primary="id">
12653                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12654                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12655                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12656                 </fields>
12657                 <links>
12658                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12659                 </links>
12660         </class>
12661
12662         <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">
12663                 <fields oils_persist:primary="id">
12664                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12665                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12666                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12667                 </fields>
12668                 <links>
12669                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12670                 </links>
12671         </class>
12672
12673         <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">
12674                 <fields oils_persist:primary="id">
12675                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12676
12677                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12678                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12679                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12680
12681                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12682                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12683                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12684
12685                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12686                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12687
12688                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12689                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12690                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12691
12692                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12693                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12694
12695                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12696                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12697                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12698
12699                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12700                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12701                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12702
12703                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12704                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12705                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12706                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12707
12708                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12709                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12710
12711                 </fields>
12712                 <links>
12713                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12714                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12715                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12716                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12717                 </links>
12718         </class>
12719
12720         <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">
12721                 <oils_persist:source_definition><![CDATA[
12722
12723             SELECT
12724                 po.ordering_agency AS ordering_agency,
12725                 po.id AS purchase_order,
12726                 li.id AS lineitem,
12727                 lid.id AS lineitem_detail,
12728                 cpa.id AS claim_policy_action
12729             FROM
12730                 acq.lineitem_detail lid
12731                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12732                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12733                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12734                 JOIN acq.claim_policy_action cpa ON (
12735                     cpa.claim_policy = cp.id
12736
12737                     -- we only care about claim policy actions whose claim
12738                     -- interval we'd reached or exceeded
12739                     AND (NOW() - cpa.action_interval) > po.order_date
12740
12741                     -- filter out all claim policy actions where claim events
12742                     -- have occurred on or after the action's action_interval
12743                     AND NOT EXISTS (
12744                         SELECT 1
12745                         FROM
12746                             acq.claim_event evt
12747                             JOIN acq.claim claim ON (
12748                                 claim.id = evt.claim
12749                                 AND claim.lineitem_detail = lid.id
12750                             )
12751                         WHERE
12752                             evt.event_date >= (po.order_date + cpa.action_interval)
12753                     )
12754                 )
12755             WHERE
12756                 lid.cancel_reason IS NULL
12757                 AND li.cancel_reason IS NULL -- belt/suspenders
12758                 AND po.cancel_reason IS NULL -- belt/suspenders
12759                 AND lid.recv_time IS NULL
12760                 AND po.state = 'on-order'
12761             ORDER BY 1, 2, 3, 4, 5
12762
12763                 ]]></oils_persist:source_definition>
12764                 <fields>
12765                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12766                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12767                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12768                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12769                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12770                 </fields>
12771                 <links>
12772                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12773                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12774                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12775                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12776                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12777                 </links>
12778         </class>
12779         <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">
12780                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12781                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12782                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12783                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12784                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12785                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12786                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12787                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12788                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12789                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12790                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12791                 </fields>
12792                 <links>
12793                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12794                 </links>
12795     </class>
12796         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12797                 <oils_persist:source_definition><![CDATA[
12798             SELECT * FROM acq.lineitem_summary 
12799                                 WHERE item_count > (invoice_count + cancel_count)
12800         ]]></oils_persist:source_definition>
12801                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12802                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12803                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12804                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12805                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12806                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12807                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12808                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12809                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12810                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12811                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12812                 </fields>
12813                 <links>
12814                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12815                 </links>
12816     </class>
12817         <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">
12818                 <oils_persist:source_definition><![CDATA[
12819
12820                         SELECT  t.*
12821                           FROM  action.transit_copy t
12822                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12823                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12824                           WHERE s.parent_ou <> d.parent_ou
12825
12826                 ]]></oils_persist:source_definition>
12827                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12828                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12829                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12830                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12831                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12832                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12833                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12834                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12835                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12836                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12837                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12838                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12839                 </fields>
12840                 <links>
12841                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12842                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12843                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12844                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12845                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12846                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12847                 </links>
12848         </class>
12849
12850     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12851                 <oils_persist:source_definition><![CDATA[
12852
12853         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12854                 SELECT
12855                         cp.id as copy,
12856                         COUNT(circ.id),
12857                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12858                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12859                 FROM
12860                         asset.copy cp
12861                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12862                 GROUP BY 1, 3, 4
12863                 UNION ALL
12864                 SELECT
12865                         cp.id as copy,
12866                         COUNT(circ.id),
12867                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12868                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12869                 FROM
12870                         asset.copy cp
12871                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12872                 GROUP BY 1, 3, 4
12873                 UNION ALL
12874                 SELECT
12875                         id as copy,
12876                         circ_count,
12877                         -1 AS year,
12878                         false as is_renewal
12879                 FROM
12880                         extend_reporter.legacy_circ_count
12881         )x GROUP BY 1, 3, 4
12882
12883                 ]]></oils_persist:source_definition>
12884         <fields>
12885             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12886             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12887             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12888             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12889         </fields>
12890                 <links>
12891                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12892                 </links>
12893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12894                         <actions>
12895                                 <retrieve/>
12896                         </actions>
12897                 </permacrud>
12898     </class>
12899
12900         <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">
12901                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12902                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12903                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12904                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12905                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12906                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12907                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12908                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12909                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12910                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12911                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12912                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12913                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12914                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12915                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12916                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12917                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12918                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12919                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12920                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12921                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12922                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12923                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12924                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12925                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12926                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12927                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12928                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12929                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12930                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12931                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12932                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12933                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12934                 </fields>
12935                 <links>
12936                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12937                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12938                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12939                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12940                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12941                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12942                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12943                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12944                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12945                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12946                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12947                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12948                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12949                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12950                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12951                 </links>
12952         </class>
12953
12954     <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">
12955         <fields oils_persist:primary="id">
12956             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12957             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12958             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12959             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12960             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12961             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12962             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12963             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12964             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12965             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12966             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12967             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12968             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12969             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12970             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12971             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12972             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12973             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12974             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12975             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12976             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12977             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12978             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12979             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12980             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12981             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12982             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12983             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12984             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12985             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12986             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12987             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12988             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12989             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12990         </fields>
12991         <links>
12992             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12993             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12994             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12995             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12996             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12997             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12998             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12999             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
13000         </links>
13001     </class>
13002
13003     <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">
13004         <fields oils_persist:primary="id">
13005             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13006             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13007             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13008             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13009         </fields>
13010         <links>
13011             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13012             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13013         </links>
13014     </class>
13015
13016     <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">
13017         <fields oils_persist:primary="owning_lib">
13018             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13019             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13020             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13021         </fields>
13022         <links>
13023             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13024         </links>
13025     </class>
13026
13027     <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">
13028         <fields oils_persist:primary="id">
13029             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13030             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13031             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13032             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13033             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13034         </fields>
13035         <links>
13036             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13037             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13038             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13039         </links>
13040     </class>
13041
13042     <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">
13043         <fields oils_persist:primary="circ_lib">
13044             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13045             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13046             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13047             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13048         </fields>
13049         <links>
13050             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13051             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13052         </links>
13053     </class>
13054
13055     <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">
13056         <fields oils_persist:primary="id">
13057             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13058             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13059             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13060             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13061             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13062         </fields>
13063         <links>
13064             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13065             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13066             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13067         </links>
13068     </class>
13069
13070     <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">
13071         <fields oils_persist:primary="home_ou">
13072             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13073             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13074             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13075             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13076         </fields>
13077         <links>
13078             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13079             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13080         </links>
13081     </class>
13082         <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">
13083                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
13084                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
13085                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13086                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13087                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
13088                 </fields>
13089                 <links>
13090                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13091                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
13092                 </links>
13093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13094                         <actions>
13095                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13096                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
13097                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13098                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13099                         </actions>
13100                 </permacrud>
13101         </class>
13102         <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">
13103                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
13104                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
13105                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
13106                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
13107                 </fields>
13108                 <links>
13109                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
13110                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
13111                         </links>
13112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13113                 <actions>
13114                                 <create permission="ADMIN_ACQ_FUND_TAG">
13115                                         <context link="tag" field="owner"/>
13116                                 </create>
13117                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
13118                                         <context link="tag" field="owner"/>
13119                                 </retrieve>
13120                                 <update permission="ADMIN_ACQ_FUND_TAG">
13121                                         <context link="tag" field="owner"/>
13122                                 </update>
13123                                 <delete permission="ADMIN_ACQ_FUND_TAG">
13124                                         <context link="tag" field="owner"/>
13125                                 </delete>
13126                         </actions>
13127                 </permacrud>
13128         </class>
13129         <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">
13130                 <oils_persist:source_definition><![CDATA[
13131                 SELECT
13132                         poi.purchase_order AS purchase_order,
13133                         ii.invoice AS invoice,
13134                         NULL AS lineitem,
13135                         poi.id AS po_item,
13136                         NULL AS picklist
13137                 FROM
13138                         acq.po_item poi
13139                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
13140                 UNION SELECT
13141                         jub.purchase_order AS purchase_order,
13142                         ie.invoice AS invoice,
13143                         jub.id AS lineitem,
13144                         NULL AS po_item,
13145                         jub.picklist AS picklist
13146                 FROM
13147                         acq.lineitem jub
13148                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
13149                 UNION SELECT
13150                         ii.purchase_order AS purchase_order,
13151                         ii.invoice AS invoice,
13152                         NULL AS lineitem,
13153                         NULL AS po_item,
13154                         NULL AS picklist
13155                 FROM
13156                         acq.invoice_item ii
13157                 WHERE ii.po_item IS NULL
13158                 UNION SELECT
13159                         ie.purchase_order AS purchase_order,
13160                         ie.invoice AS invoice,
13161                         NULL AS lineitem,
13162                         NULL AS po_item,
13163                         NULL AS picklist
13164                 FROM
13165                         acq.invoice_entry ie
13166                 WHERE ie.lineitem IS NULL
13167                 UNION SELECT
13168                         NULL AS purchase_order,
13169                         NULL AS invoice,
13170                         jub.id AS lineitem,
13171                         NULL AS po_item,
13172                         jub.picklist AS picklist
13173                 FROM
13174                         acq.lineitem jub
13175                 WHERE jub.purchase_order IS NULL
13176                 ]]></oils_persist:source_definition>
13177                 <fields>
13178                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
13179                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
13180                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
13181                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
13182                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
13183                 </fields>
13184                 <links>
13185                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
13186                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
13187                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
13188                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
13189                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
13190                 </links>
13191         </class>
13192         <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">
13193                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
13194                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13195                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13196                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
13197                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
13198                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
13199                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
13200                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
13201                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
13202                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
13203                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
13204                 </fields>
13205                 <links>
13206                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13207                 </links>
13208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13209                         <actions>
13210                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13211                                 <retrieve/>
13212                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13213                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13214                         </actions>
13215                 </permacrud>
13216         </class>
13217
13218         <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">
13219                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
13220                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13221                         <field name="date_applied" reporter:datatype="timestamp"/>
13222                         <field name="org" reporter:datatype="org_unit"/>
13223                         <field name="original_value" reporter:datatype="text"/>
13224                         <field name="new_value" reporter:datatype="text"/>
13225                         <field name="field_name" reporter:datatype="link"/>
13226                 </fields>
13227                 <links>
13228                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
13229                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
13230                 </links>
13231         </class>
13232         <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">
13233                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13234                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13235                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13236                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13237                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13238                 </fields>
13239                 <links>
13240                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13241                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
13242                 </links>
13243         </class>
13244         <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">
13245                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13246                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13247                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13248                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13249                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13250                 </fields>
13251                 <links>
13252                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13253                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
13254                 </links>
13255         </class>
13256         <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">
13257                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
13258                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
13259                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13260                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
13261                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
13262                 </fields>
13263                 <links>
13264                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
13265                 </links>
13266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13267                         <actions>
13268                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13269                                 <retrieve/>
13270                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13271                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13272                         </actions>
13273                 </permacrud>
13274         </class>
13275         <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">
13276                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
13277                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13278                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
13279                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
13280                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
13281                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
13282                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
13283                 </fields>
13284                 <links>
13285                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
13286                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
13287                 </links>
13288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13289                         <actions>
13290                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13291                                 <retrieve/>
13292                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13293                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13294                         </actions>
13295                 </permacrud>
13296         </class>
13297         <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">
13298                 <fields oils_persist:primary="code">
13299                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
13300                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
13301                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13302                 </fields>
13303                 <links>
13304                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13305                 </links>
13306                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13307                         <actions>
13308                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13309                                 <retrieve/>
13310                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13311                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13312                         </actions>
13313                 </permacrud>
13314         </class>
13315         <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">
13316                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
13317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13318                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
13319                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
13320                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13321                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
13322                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
13323                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13324                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
13325                 </fields>
13326                 <links>
13327                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
13328                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13329                 </links>
13330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13331                         <actions>
13332                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
13333                                 <retrieve/>
13334                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
13335                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
13336                         </actions>
13337                 </permacrud>
13338         </class>
13339         <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">
13340                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
13341                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13342                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
13343                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
13344                 </fields>
13345                 <links>
13346                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13347                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
13348                 </links>
13349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13350                         <actions>
13351                                 <create permission="UPDATE_COPY">
13352                     <context link="copy" field="circ_lib"/>
13353                 </create>
13354                                 <retrieve/>
13355                                 <update permission="UPDATE_COPY">
13356                     <context link="copy" field="circ_lib"/>
13357                 </update>
13358                                 <delete permission="UPDATE_COPY">
13359                     <context link="copy" field="circ_lib"/>
13360                 </delete>
13361                         </actions>
13362                 </permacrud>
13363         </class>
13364         <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">
13365         <oils_persist:source_definition><![CDATA[
13366         SELECT ahcm.target_copy AS id,count(*) AS count
13367          FROM
13368          action.hold_request ahr,
13369          action.hold_copy_map ahcm
13370          WHERE
13371          ahr.cancel_time IS NULL AND
13372          ahr.fulfillment_time IS NULL AND
13373          ahr.capture_time IS NULL AND
13374          ahr.id = ahcm.hold
13375          GROUP BY ahcm.target_copy
13376         ]]></oils_persist:source_definition>
13377         <fields oils_persist:primary="id">
13378             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13379             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
13380         </fields>
13381         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13382             <actions>
13383                <retrieve/>
13384             </actions>
13385         </permacrud>
13386         </class>
13387
13388         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
13389                 oils_obj:fieldmapper="config::workstation_setting_type" 
13390                 oils_persist:tablename="config.workstation_setting_type" 
13391                 reporter:label="Workstation Setting Type">
13392                 <fields oils_persist:primary="name">
13393                         <field name="name" reporter:datatype="text"/>
13394                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
13395                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
13396                         <field name="datatype" reporter:datatype="text"/>
13397                         <field name="fm_class" reporter:datatype="text"/>
13398                         <field name="grp" reporter:datatype="link"/>
13399                 </fields>
13400                 <links>
13401                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13402                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13403                 </links>
13404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13405                         <actions>
13406                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13407                                 <retrieve/>
13408                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13409                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13410                         </actions>
13411                 </permacrud>
13412         </class>
13413
13414         <!-- no pcrud access is granted for now, because it's assumed these
13415                          setting values will be applied and retrived via the API. -->
13416         <class id="awss" 
13417                 controller="open-ils.cstore"
13418                 oils_obj:fieldmapper="actor::workstation_setting" 
13419                 oils_persist:tablename="actor.workstation_setting" 
13420                 reporter:label="Workstation Setting">
13421                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13422                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13423                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13424                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13425                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13426                 </fields>
13427                 <links>
13428                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13429                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13430                 </links>
13431         </class>
13432
13433         <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">
13434         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13435                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13436                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13437                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13438         </fields>
13439         </class>
13440
13441         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13442                 oils_obj:fieldmapper="config::print_template" 
13443                 oils_persist:tablename="config.print_template" 
13444                 reporter:label="Print Templates">
13445                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13446                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13447                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13448                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13449                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13450                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13451                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13452                         <field name="content_type" reporter:datatype="text"/>
13453                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13454                 </fields>
13455                 <links>
13456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13457                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13458                 </links>
13459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13460                         <actions>
13461                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13462                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13463                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13464                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13465                         </actions>
13466                 </permacrud>
13467         </class>
13468
13469         <class id="cct" 
13470                 controller="open-ils.cstore open-ils.pcrud"
13471                 oils_obj:fieldmapper="config::carousel_type" 
13472                 oils_persist:tablename="config.carousel_type" 
13473                 reporter:label="Carousel Types">
13474                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13475                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13476                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13477                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13478                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13479                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13480                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13481                 </fields>
13482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13483                         <actions>
13484                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13485                                 <retrieve/>
13486                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13487                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13488                         </actions>
13489                 </permacrud>
13490         </class>
13491
13492         <class id="cc" 
13493                 controller="open-ils.cstore open-ils.pcrud"
13494                 oils_obj:fieldmapper="container::carousel" 
13495                 oils_persist:tablename="container.carousel" 
13496                 reporter:label="Carousels">
13497                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13498                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13499                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13500                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13501                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13502                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13503                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13504                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13505                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13506                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13507                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13508                         <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 -->
13509                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13510                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13511                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13512                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13513                 </fields>
13514                 <links>
13515                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13516                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13517                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13518                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13519                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13520                 </links>
13521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13522                         <actions>
13523                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13524                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13525                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13526                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13527                         </actions>
13528                 </permacrud>
13529         </class>
13530
13531         <class id="ccou" 
13532                 controller="open-ils.cstore open-ils.pcrud"
13533                 oils_obj:fieldmapper="container::carousel_org_unit" 
13534                 oils_persist:tablename="container.carousel_org_unit" 
13535                 reporter:label="Carousels Visible at Library">
13536                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13537                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13538                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13539                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13540                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13541                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13542                 </fields>
13543                 <links>
13544                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13545                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13546                 </links>
13547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13548                         <actions>
13549                                 <create permission="ADMIN_CAROUSEL">
13550                                     <context link="carousel" field="owner" />
13551                                 </create>
13552                                 <retrieve permission="ADMIN_CAROUSEL">
13553                                     <context link="carousel" field="owner" />
13554                                 </retrieve>
13555                                 <update permission="ADMIN_CAROUSEL">
13556                                     <context link="carousel" field="owner" />
13557                                 </update>
13558                                 <delete permission="ADMIN_CAROUSEL">
13559                                     <context link="carousel" field="owner" />
13560                                 </delete>
13561                         </actions>
13562                 </permacrud>
13563         </class>
13564
13565         <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">
13566                 <fields oils_persist:primary="name">
13567                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13568                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13569                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13570                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13571                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13572                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13573                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13574                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13575                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13576                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13577                 </fields>
13578                 <links>
13579                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13580                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13581                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13582                 </links>
13583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13584                         <actions>
13585                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13586                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13587                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13588                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13589                         </actions>
13590                 </permacrud>
13591         </class>
13592         <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">
13593                 <fields oils_persist:primary="id" oils_persist:sequence="config.geolocation_service_id_seq">
13594                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
13595                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true"/>
13596                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13597                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
13598                         <field reporter:label="Service Code" name="service_code" reporter:datatype="text"/>
13599                         <field reporter:label="API Key" name="api_key" reporter:datatype="text"/>
13600                 </fields>
13601                 <links>
13602                         <link field="owner" reltype="has_a" key="id" class="aou"/>
13603                 </links>
13604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13605                         <actions>
13606                                 <create permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13607                                 <retrieve permission="VIEW_GEOLOCATION_SERVICES" global_required="true"/>
13608                                 <update permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13609                                 <delete permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13610                         </actions>
13611                 </permacrud>
13612         </class>
13613
13614         <!-- ********************************************************************************************************************* -->
13615 </IDL>
13616
13617 <!--
13618     vim:noet:ts=4:sw=4:
13619 -->