]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1638299: improve extraction of headings from authority records
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <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">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <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">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <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">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <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">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <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">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <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">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <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">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <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">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <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">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <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">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <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">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <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">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <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">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <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">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <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">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <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">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <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">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <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">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <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">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <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">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <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">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <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">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <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">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <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">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <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">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <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">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <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">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <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">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <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)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <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">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <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">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <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">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <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">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <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">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <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">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="ADMIN_COPY_BUCKET">
2438                     <context link="bucket" owning_lib="owning_lib"/>
2439                 </retrieve>
2440             </actions>
2441         </permacrud>
2442         </class>
2443         <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">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2445                         <field name="id" reporter:datatype="id" />
2446                         <field name="item" reporter:datatype="link"/>
2447                         <field name="note" reporter:datatype="text" />
2448                 </fields>
2449                 <links>
2450                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2451                 </links>
2452         </class>
2453
2454         <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">
2455                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2456                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2458                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2459                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2460                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2461                 </fields>
2462                 <links>
2463                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2464                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2465                 </links>
2466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467                         <actions>
2468                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2469                                 <retrieve/>
2470                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2472                         </actions>
2473                 </permacrud>
2474         </class>
2475
2476         <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">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2478                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2480                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2481                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2482                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2483                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2484                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2485                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2486                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2487                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2488                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2489                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2490                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2491                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2492                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2493                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2494                 </fields>
2495                 <links>
2496                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2497                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2498                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2499                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2500                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2501                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2502                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2503                 </links>
2504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2505                         <actions>
2506                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                                 <retrieve/>
2508                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2509                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2510                         </actions>
2511                 </permacrud>
2512         </class>
2513
2514         <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">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2516                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2517                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2518                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2519                 </fields>
2520                 <links>
2521                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2522                 </links>
2523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524                         <actions>
2525                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <retrieve/>
2527                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2528                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2529                         </actions>
2530                 </permacrud>
2531         </class>
2532
2533         <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">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2536                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2537                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2541                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2542                 </links>
2543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544                         <actions>
2545                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <retrieve/>
2547                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2548                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2549                         </actions>
2550                 </permacrud>
2551         </class>
2552
2553         <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">
2554                 <fields oils_persist:primary="code">
2555                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2556                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2557                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2558                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2559                 </fields>
2560                 <links>
2561                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2562                 </links>
2563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2564                         <actions>
2565                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2566                                 <retrieve/>
2567                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2568                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2569                         </actions>
2570                 </permacrud>
2571         </class>
2572
2573         <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">
2574                 <fields oils_persist:primary="code">
2575                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2576                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2577                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2578                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2579                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2580                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2581                 </fields>
2582                 <links>
2583                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2584                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2585                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2586                 </links>
2587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2588                         <actions>
2589                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2590                                 <retrieve/>
2591                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2592                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2593                         </actions>
2594                 </permacrud>
2595         </class>
2596
2597     <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">
2598         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2599             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2600             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2601             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2602         </fields>
2603         <links>
2604             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2605             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2606         </links>
2607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2608             <actions>
2609                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2610                 <retrieve/>
2611                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2613             </actions>
2614         </permacrud>
2615     </class>
2616
2617         <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">
2618                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2619                         <field name="active" reporter:datatype="bool"/>
2620                         <field name="create_date" reporter:datatype="timestamp"/>
2621                         <field name="creator" />
2622                         <field name="deleted" reporter:datatype="bool"/>
2623                         <field name="edit_date" reporter:datatype="timestamp"/>
2624                         <field name="editor" />
2625                         <field name="id" reporter:datatype="id" />
2626                         <field name="last_xact_id" />
2627                         <field name="marc" />
2628                         <field name="source" />
2629                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2630                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2631                         <field name="heading" />
2632                         <field name="simple_heading" />
2633                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2634                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2635                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2636                 </fields>
2637                 <links>
2638                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2639                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2640                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2641                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2642                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2643                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2644                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2645                 </links>
2646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2647                         <actions>
2648                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2649                                 <retrieve/>
2650                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2651                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2652                         </actions>
2653                 </permacrud>
2654         </class>
2655         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2656                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2657                         <field name="char_encoding" />
2658                         <field name="id" />
2659                         <field name="record" />
2660                         <field name="record_status" />
2661                         <field name="thesaurus" />
2662                 </fields>
2663                 <links>
2664                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2665                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2666                 </links>
2667         </class>
2668         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2669                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2670                         <field name="id" reporter:datatype="id" />
2671                         <field name="bib" reporter:datatype="link" />
2672                         <field name="authority" reporter:datatype="link" />
2673                 </fields>
2674                 <links>
2675                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2676                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2677                 </links>
2678         </class>
2679         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2680                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2681                         <field name="id" reporter:datatype="id" />
2682                         <field name="record" reporter:datatype="link" />
2683                         <field name="atag" reporter:datatype="link" />
2684                         <field name="value" reporter:datatype="text" />
2685                 </fields>
2686                 <links>
2687                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2688                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2689                 </links>
2690         </class>
2691
2692         <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">
2693                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2694                         <field name="id" reporter:datatype="id" />
2695                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2696                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2697                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2698                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2699                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2700                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2701                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2702                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2703                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2704                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2705                 </fields>
2706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2707                         <actions>
2708                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2709                                 <retrieve/>
2710                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2711                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2712                         </actions>
2713                 </permacrud>
2714         </class>
2715
2716         <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">
2717                 <fields oils_persist:primary="code" oils_persist:sequence="">
2718                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2719                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2720                 </fields>
2721                 <links/>
2722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2723             <actions>
2724                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2725                 <retrieve/>
2726                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2727                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2728             </actions>
2729         </permacrud>
2730         </class>
2731         <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">
2732                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2733                         <field name="accepting_usr" />
2734                         <field name="amount" reporter:datatype="money" />
2735                         <field name="amount_collected" reporter:datatype="money" />
2736                         <field name="approval_code" reporter:datatype="text"/>
2737                         <field name="cash_drawer" reporter:datatype="link"/>
2738                         <field name="cc_number" reporter:datatype="text"/>
2739                         <field name="cc_order_number" reporter:datatype="text"/>
2740                         <field name="cc_processor" reporter:datatype="text"/>
2741                         <field name="id" reporter:datatype="id" />
2742                         <field name="note" reporter:datatype="text"/>
2743                         <field name="payment_ts" reporter:datatype="timestamp"/>
2744                         <field name="xact" reporter:datatype="link"/>
2745                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2746                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2747                 </fields>
2748                 <links>
2749                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2750                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2751                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2752                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2753                 </links>
2754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2755             <actions>
2756                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2757                     <context link="xact" jump="usr" field="home_ou"/>
2758                 </retrieve>
2759                         </actions>
2760                 </permacrud>
2761         </class>
2762         <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">
2763                 <fields oils_persist:primary="name">
2764                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2765                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2766                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2767                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2768                 </fields>
2769                 <links/>
2770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2771             <actions>
2772                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2773                 <retrieve/>
2774                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2775                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2776             </actions>
2777         </permacrud>
2778         </class>
2779
2780         <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">
2781                 <fields oils_persist:primary="alias">
2782                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2783                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2784                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2785                 </fields>
2786                 <links>
2787                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2788                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2789                 </links>
2790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2791             <actions>
2792                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2793                 <retrieve/>
2794                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2795                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2796             </actions>
2797         </permacrud>
2798         </class>
2799
2800         <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">
2801                 <fields oils_persist:primary="name">
2802                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2803                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2804                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2805                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2806                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2807                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2808                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2809                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2810                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2811                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2812                 </fields>
2813                 <links>
2814                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2815                 </links>
2816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2817             <actions>
2818                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2819                 <retrieve/>
2820                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2821                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2822             </actions>
2823         </permacrud>
2824         </class>
2825
2826         <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">
2827                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2828                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2829                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2830                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2831                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2832                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2833                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2834                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2835                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2836                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2837                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2838                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2839                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2840                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2841                 </fields>
2842                 <links>
2843                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2844                 </links>
2845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2846             <actions>
2847                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2848                 <retrieve/>
2849                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2850                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2851             </actions>
2852         </permacrud>
2853         </class>
2854         <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">
2855                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2856                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2857                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2858                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2859                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2860                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2861                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2862                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2863                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2864                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2865                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2866                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2867                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2868                 </fields>
2869                 <links>
2870                 </links>
2871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2872                         <actions>
2873                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2874                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2875                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2876                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2877                         </actions>
2878                 </permacrud>
2879         </class>
2880         <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">
2881                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2882                         <field name="id" reporter:datatype="id" />
2883                         <field name="name" reporter:datatype="text"/>
2884                         <field name="xpath" reporter:datatype="text"/>
2885                         <field name="format" reporter:datatype="link"/>
2886                         <field name="first_word" reporter:datatype="bool" />
2887                 </fields>
2888                 <links/>
2889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2890             <actions>
2891                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2892                 <retrieve/>
2893                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2894                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2895             </actions>
2896         </permacrud>
2897         </class>
2898         <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">
2899                 <fields oils_persist:primary="code" oils_persist:sequence="">
2900                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2901                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2902                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2903                 </fields>
2904                 <links/>
2905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2906             <actions>
2907                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2908                 <retrieve/>
2909                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2910                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2911             </actions>
2912         </permacrud>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="code" oils_persist:sequence="">
2916                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2917                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2918                 </fields>
2919                 <links/>
2920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2921             <actions>
2922                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2923                 <retrieve/>
2924                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2925                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2926             </actions>
2927         </permacrud>
2928         </class>
2929     <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">
2930         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2931             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2932             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2933             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2934             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2935         </fields>
2936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2937             <actions>
2938                 <retrieve/>
2939             </actions>
2940         </permacrud>
2941     </class>
2942         <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">
2943                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2944                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2945                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2946                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2947                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2948                 </fields>
2949                 <links>
2950                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2951                 </links>
2952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2953             <actions>
2954                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2955                 <retrieve/>
2956                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2957                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2958             </actions>
2959         </permacrud>
2960         </class>
2961         <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">
2962                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2963                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2964                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2965                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2966                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2967                 </fields>
2968                 <links>
2969                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2970                 </links>
2971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2972             <actions>
2973                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2974                 <retrieve/>
2975                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2976                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2977             </actions>
2978         </permacrud>
2979         </class>
2980         <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">
2981                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2982                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2984                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2985                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2986                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2987                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2988                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2989                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2990                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2991                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2992                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2993                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2994                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2995                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2996                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2997                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2998                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2999                 </fields>
3000                 <links>
3001                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3002                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3003                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3004                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3005                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3006                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3007                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3008                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3009                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3010                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3011                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3012                 </links>
3013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3014             <actions>
3015                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3016                 <retrieve/>
3017                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3018                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3019             </actions>
3020         </permacrud>
3021         </class>
3022         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3023                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3024                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3025                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3026                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3027                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3028                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3029                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3030                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3031                 </fields>
3032                 <links>
3033                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3034                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3035         </links>
3036         </class>
3037         <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">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3039                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3040                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3041                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3042                 </fields>
3043                 <links>
3044                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3045                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3046                 </links>
3047         </class>
3048         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3049                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3050                         <field name="id" reporter:datatype="id" />
3051                         <field name="value" oils_persist:i18n="true" />
3052                 </fields>
3053                 <links/>
3054         </class>
3055         <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">
3056                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3057                         <field name="balance_owed" reporter:datatype="money" />
3058                         <field name="total_owed" reporter:datatype="money" />
3059                         <field name="total_paid" reporter:datatype="money" />
3060                         <field name="usr" reporter:datatype="link"/>
3061                 </fields>
3062                 <links>
3063                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3064         </links>
3065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3066             <actions>
3067                 <retrieve permission="VIEW_USER">
3068                     <context link="usr" field="home_ou"/>
3069                 </retrieve>
3070             </actions>
3071         </permacrud>
3072         </class>
3073         <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">
3074                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3075                         <field name="collector" />
3076                         <field name="enter_time" reporter:datatype="timestamp"/>
3077                         <field name="id" reporter:datatype="id" />
3078                         <field name="location" reporter:datatype="link"/>
3079                         <field name="usr" reporter:datatype="link"/>
3080                 </fields>
3081                 <links>
3082                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3083                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3084                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3085                 </links>
3086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="money.collections_tracker.create" context_field="location"/>
3089                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3090                 <delete permission="money.collections_tracker.create" context_field="location"/>
3091             </actions>
3092         </permacrud>
3093         </class>
3094         <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">
3095                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3096                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3097                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3098                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3099                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3100                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3101                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3102                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3103                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3104                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3105                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3106                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3107                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3108                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3109                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3110                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3111                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3112                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3113                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3114                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3115                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3116                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3117                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3118                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3119                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3120                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3121                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3122                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3123                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3124                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3125                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3126                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3127                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3128                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3129                 </fields>
3130                 <links>
3131                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3132                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3133                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3134                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3135                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3136                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3137                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3138                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3139                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3140                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3141                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3142                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3143                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3144                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3145                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3146                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3147                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3148                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3149                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3150                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3151                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3152                 </links>
3153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3154             <actions>
3155                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3156                 <retrieve/>
3157                 <update permission="UPDATE_MARC" global_required="true"/>
3158                 <!-- 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. -->
3159                 <delete permission="DELETE_RECORD" global_required="true"/>
3160             </actions>
3161         </permacrud>
3162         </class>
3163         <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">
3164                 <fields oils_persist:primary="id">
3165                         <field name="dow_0_close" />
3166                         <field name="dow_0_open" />
3167                         <field name="dow_1_close" />
3168                         <field name="dow_1_open" />
3169                         <field name="dow_2_close" />
3170                         <field name="dow_2_open" />
3171                         <field name="dow_3_close" />
3172                         <field name="dow_3_open" />
3173                         <field name="dow_4_close" />
3174                         <field name="dow_4_open" />
3175                         <field name="dow_5_close" />
3176                         <field name="dow_5_open" />
3177                         <field name="dow_6_close" />
3178                         <field name="dow_6_open" />
3179                         <field name="id" reporter:datatype="id" />
3180                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3181                 </fields>
3182                 <links>
3183                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3184                 </links>
3185         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3186             <actions>
3187                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3188                 <retrieve/>
3189                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3190                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3191             </actions>
3192         </permacrud>
3193         </class>
3194         <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">
3195                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3196                         <field name="id" reporter:datatype="id" />
3197                         <field name="record" reporter:datatype="link"/>
3198                         <field name="label" reporter:datatype="text"/>
3199                         <field name="label_sortkey" reporter:datatype="text"/>
3200                         <field name="deleted" reporter:datatype="bool"/>
3201                 </fields>
3202                 <links>
3203                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3204                 </links>
3205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3206             <actions>
3207                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3208                 <retrieve/>
3209                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3210                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3211             </actions>
3212         </permacrud>
3213         </class>
3214         <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">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3216                         <field name="id" reporter:datatype="id" />
3217                         <field name="target_copy" reporter:datatype="link" />
3218                         <field name="part" reporter:datatype="link"/>
3219                 </fields>
3220                 <links>
3221                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3222                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3223                 </links>
3224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3225             <actions>
3226                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3227                 <retrieve/>
3228                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3229                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3230             </actions>
3231         </permacrud>
3232         </class>
3233         <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">
3234                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3235                         <field name="close_end" reporter:datatype="timestamp" />
3236                         <field name="close_start" reporter:datatype="timestamp" />
3237                         <field name="id" reporter:datatype="id" />
3238                         <field name="org_unit" reporter:datatype="org_unit"/>
3239                         <field name="reason" reporter:datatype="text"/>
3240                         <field name="full_day" reporter:datatype="bool"/>
3241                         <field name="multi_day" reporter:datatype="bool"/>
3242                 </fields>
3243                 <links>
3244                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3245                 </links>
3246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3247             <actions>
3248                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3249                 <retrieve/>
3250                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3251                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3252             </actions>
3253         </permacrud>
3254         </class>
3255         <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">
3256                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3257                         <field name="extended" reporter:datatype="interval"/>
3258                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3259                         <field name="max_renewals" reporter:datatype="int" />
3260                         <field name="name" reporter:datatype="text"/>
3261                         <field name="normal" reporter:datatype="interval"/>
3262                         <field name="shrt" reporter:datatype="interval"/>
3263                 </fields>
3264                 <links>
3265                 </links>
3266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3267             <actions>
3268                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3269                 <retrieve/>
3270                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3271                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3272             </actions>
3273         </permacrud>
3274         </class>
3275
3276         <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">
3277                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3278                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3279                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3280             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3281                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3282             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3283                 </fields>
3284                 <links>
3285             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3286                 </links>
3287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3288             <actions>
3289                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3290                 <retrieve/>
3291                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3292                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3293             </actions>
3294                 </permacrud>
3295         </class>
3296
3297         <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">
3298                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3299                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3300                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3301                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3302             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3303                 </fields>
3304                 <links>
3305                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3306                 </links>
3307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3308             <actions>
3309                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3310                 <retrieve/>
3311                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3312                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3313             </actions>
3314                 </permacrud>
3315         </class>
3316
3317         <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">
3318                 <fields oils_persist:primary="id" oils_persist:sequence="">
3319                         <field name="balance_owed" reporter:datatype="money"/>
3320                         <field name="id" reporter:datatype="id" />
3321                         <field name="last_billing_note" reporter:datatype="text"/>
3322                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3323                         <field name="last_billing_type" reporter:datatype="text"/>
3324                         <field name="last_payment_note" reporter:datatype="text"/>
3325                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3326                         <field name="last_payment_type" reporter:datatype="text"/>
3327                         <field name="total_owed" reporter:datatype="money"/>
3328                         <field name="total_paid" reporter:datatype="money"/>
3329                         <field name="usr" reporter:datatype="link"/>
3330                         <field name="xact_finish" reporter:datatype="timestamp" />
3331                         <field name="xact_start" reporter:datatype="timestamp" />
3332                         <field name="xact_type" reporter:datatype="text"/>
3333                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3334                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3335                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3336                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3337                         <field name="billing_location" reporter:datatype="link"/>
3338                 </fields>
3339                 <links>
3340                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3341                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3342                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3343                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3344                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3345                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3346                 </links>
3347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3348                         <actions>
3349                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3350                                         <context link="usr" field="home_ou" />
3351                                 </retrieve>
3352                         </actions>
3353                 </permacrud>
3354         </class>
3355         <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">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3357                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3358                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3359                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3360                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3361                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3362                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3363                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3364                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3365                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3366                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3367                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3368                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3369                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3370                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3371                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3372                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3373                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3374                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3375                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3376                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3377                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3378                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3379                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3380                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3381                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3382                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3383                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3384                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3385                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3386                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3387                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3388                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3389                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3390                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3391                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3392                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3393                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3394                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3395                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3396                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3397                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3398                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3399                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3400                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3401                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3402                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3403                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3404                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3405                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3406                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3407                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3408                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3409                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3410                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3411                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3412                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3413                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3414                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3415                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3416                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3417                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3418                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3419                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3420                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3421                 </fields>
3422                 <links>
3423                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3424                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3425                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3426                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3427                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3428                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3429                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3430                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3431                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3432                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3433                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3434                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3435                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3436                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3437                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3438                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3439                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3440                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3441                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3442                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3443                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3444                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3445                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3446                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3447                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3448                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3449                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3450                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3451                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3452                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3453                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3454                 </links>
3455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3456                         <actions>
3457                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3458                         </actions>
3459                 </permacrud>
3460         </class>
3461         <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">
3462                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3463                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3464                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3465                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3466                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3467                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3468                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3469                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3470                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3471         </fields>
3472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3473                         <actions>
3474                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3475                                 <retrieve/>
3476                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3477                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3478                         </actions>
3479                 </permacrud>
3480         </class>
3481         <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">
3482                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3483                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3484                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3485                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3486                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3487         </fields>
3488         <links>
3489                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3490                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3491                 </links>
3492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3493                         <actions>
3494                                 <retrieve permission="RUN_REPORTS">
3495                                         <context link="usr" field="home_ou" />
3496                                 </retrieve>
3497                         </actions>
3498                 </permacrud>
3499         </class>
3500         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3502                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3503                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3504                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3505                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3506                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3507                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3508         </fields>
3509         <links>
3510                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3511                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3512                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3513                 </links>
3514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3515                         <actions>
3516                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3517                                         <context link="usr" field="home_ou" />
3518                                         <context link="ws" field="owning_lib" />
3519                                 </retrieve>
3520                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3521                                         <context link="usr" field="home_ou" />
3522                                         <context link="ws" field="owning_lib" />
3523                                 </create>
3524                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3525                                         <context link="usr" field="home_ou" />
3526                                         <context link="ws" field="owning_lib" />
3527                                 </update>
3528                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3529                                         <context link="usr" field="home_ou" />
3530                                         <context link="ws" field="owning_lib" />
3531                                 </delete>
3532                         </actions>
3533                 </permacrud>
3534         </class>
3535         <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">
3536                 <fields oils_persist:primary="name">
3537                         <field name="name" reporter:datatype="text"/>
3538                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3539                 </fields>
3540                 <links/>
3541                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3542                         <actions>
3543                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3544                                 <retrieve/>
3545                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3546                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3547                         </actions>
3548                 </permacrud>
3549         </class>
3550         <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">
3551                 <fields oils_persist:primary="name">
3552                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3553                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3554                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3555                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3556                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3557                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3558                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3559                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3560                 </fields>
3561                 <links>
3562                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3563                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3564                 </links>
3565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3566                         <actions>
3567                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3568                                 <retrieve/>
3569                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3570                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3571                         </actions>
3572                 </permacrud>
3573         </class>
3574         <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">
3575                 <fields oils_persist:primary="name">
3576                         <field name="name" reporter:datatype="text"/>
3577                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3578                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3579                         <field name="datatype" reporter:datatype="text"/>
3580                         <field name="view_perm" reporter:datatype="link"/>
3581                         <field name="update_perm" reporter:datatype="link"/>
3582                         <field name="fm_class" reporter:datatype="text"/>
3583                         <field name="grp" reporter:datatype="link"/>
3584                 </fields>
3585                 <links>
3586                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3587                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3588                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3589                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3590                 </links>
3591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3592                         <actions>
3593                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3594                                 <retrieve/>
3595                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3596                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3597                         </actions>
3598                 </permacrud>
3599         </class>
3600         <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">
3601                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3602                         <field name="id" />
3603                         <field name="name"  reporter:datatype="text"/>
3604                         <field name="org_unit" reporter:datatype="org_unit"/>
3605                         <field name="value"  reporter:datatype="text"/>
3606                 </fields>
3607                 <links>
3608                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3609                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3610                 </links>
3611         </class>
3612         <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">
3613                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3614                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3615                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3616                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3617                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3618                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3619                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3620                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3621                 </fields>
3622                 <links>
3623                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3624                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3625                 </links>
3626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3627             <actions>
3628                 <create permission="CREATE_COPY_NOTE">
3629                     <context link="owning_copy" field="circ_lib"/>
3630                 </create>
3631                 <retrieve permission="VIEW_COPY_NOTES">
3632                     <context link="owning_copy" field="circ_lib"/>
3633                 </retrieve>
3634                 <update permission="UPDATE_COPY_NOTE">
3635                     <context link="owning_copy" field="circ_lib"/>
3636                 </update>
3637                 <delete permission="DELETE_COPY_NOTE">
3638                     <context link="owning_copy" field="circ_lib"/>
3639                 </delete>
3640             </actions>
3641         </permacrud>
3642         </class>
3643         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3644                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3645                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3646                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3647                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3648                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3649                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3650                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3651                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3652                 </fields>
3653                 <links>
3654                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3655                 </links>
3656         </class>
3657         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3658                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3659                         <field name="fingerprint"  reporter:datatype="text"/>
3660                         <field name="id" reporter:datatype="id" />
3661                         <field name="master_record" reporter:datatype="link"/>
3662                         <field name="mods"  reporter:datatype="text"/>
3663                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3664                 </fields>
3665                 <links>
3666                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3667                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3668                 </links>
3669         </class>
3670         <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">
3671                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3672                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3673                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3674                 </fields>
3675                 <links/>
3676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3677             <actions>
3678                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3679                 <retrieve/>
3680                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3681                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3682             </actions>
3683         </permacrud>
3684         </class>
3685         <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">
3686                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3687                         <field name="code"  reporter:datatype="text"/>
3688                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3689                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3690                 </fields>
3691                 <links/>
3692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3693             <actions>
3694                 <create permission="CREATE_PERM" global_required="true"/>
3695                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3696                 <update permission="UPDATE_PERM" global_required="true"/>
3697                 <delete permission="DELETE_PERM" global_required="true"/>
3698             </actions>
3699         </permacrud>
3700         </class>
3701         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3702                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3703                         <field name="id" reporter:datatype="id" />
3704                         <field name="metarecord" reporter:datatype="link"/>
3705                         <field name="source" reporter:datatype="link"/>
3706                 </fields>
3707                 <links>
3708                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3709                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3710                 </links>
3711         </class>
3712         <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">
3713                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3714                         <field name="id" reporter:datatype="id" />
3715                         <field name="field" reporter:datatype="link"/>
3716                         <field name="source" reporter:datatype="link"/>
3717                         <field name="value"  reporter:datatype="text"/>
3718                 </fields>
3719                 <links>
3720                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3721                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3722                 </links>
3723         </class>
3724         <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">
3725                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3726                         <field name="id" reporter:datatype="id" />
3727                         <field name="value" reporter:datatype="text"/>
3728                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3729                 </fields>
3730                 <links>
3731                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3732                 </links>
3733         </class>
3734         <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">
3735                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3736                         <field name="id" reporter:datatype="id" />
3737                         <field name="entry" reporter:datatype="link"/>
3738                         <field name="def" reporter:datatype="link"/>
3739                         <field name="source" reporter:datatype="link"/>
3740                 </fields>
3741                 <links>
3742                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3743                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3744                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3745                 </links>
3746         </class>
3747         <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">
3748                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3749                         <field name="id" reporter:datatype="id" />
3750                         <field name="entry" reporter:datatype="link"/>
3751                         <field name="simple_heading" reporter:datatype="link"/>
3752                 </fields>
3753                 <links>
3754                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3755                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3756                 </links>
3757         </class>
3758         <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">
3759                 <oils_persist:source_definition>
3760                         SELECT * FROM metabib.author_field_entry
3761                                                 UNION ALL
3762                         SELECT * FROM metabib.keyword_field_entry
3763                                                 UNION ALL
3764                         SELECT * FROM metabib.identifier_field_entry
3765                                                 UNION ALL
3766                         SELECT * FROM metabib.title_field_entry
3767                                                 UNION ALL
3768                         SELECT * FROM metabib.subject_field_entry
3769                                                 UNION ALL
3770                         SELECT * FROM metabib.series_field_entry
3771                 </oils_persist:source_definition>
3772                 <fields>
3773                         <field name="field" reporter:datatype="link"/>
3774                         <field name="id" reporter:datatype="id" />
3775                         <field name="source" reporter:datatype="link"/>
3776                         <field name="value"  reporter:datatype="text"/>
3777                 </fields>
3778                 <links>
3779                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3780                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3781                 </links>
3782         </class>
3783         <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">
3784                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3785                         <field name="field" reporter:datatype="link"/>
3786                         <field name="id" reporter:datatype="id" />
3787                         <field name="source" reporter:datatype="link"/>
3788                         <field name="value"  reporter:datatype="text"/>
3789                 </fields>
3790                 <links>
3791                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3792                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3793                 </links>
3794         </class>
3795         <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">
3796                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3797                         <field name="accepting_usr" reporter:datatype="link"/>
3798                         <field name="amount" reporter:datatype="money" />
3799                         <field name="amount_collected" reporter:datatype="money" />
3800                         <field name="cash_drawer" reporter:datatype="link"/>
3801                         <field name="id" reporter:datatype="id" />
3802                         <field name="note"  reporter:datatype="text"/>
3803                         <field name="payment_ts" reporter:datatype="timestamp"/>
3804                         <field name="xact" reporter:datatype="link"/>
3805                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3806                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3807                 </fields>
3808                 <links>
3809                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3810                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3811                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3812                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3813                 </links>
3814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3815             <actions>
3816                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3817                     <context link="xact" jump="usr" field="home_ou"/>
3818                 </retrieve>
3819                         </actions>
3820                 </permacrud>
3821         </class>
3822         <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">
3823                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3824                         <field name="accepting_usr" reporter:datatype="link"/>
3825                         <field name="amount" reporter:datatype="money" />
3826                         <field name="amount_collected" reporter:datatype="money" />
3827                         <field name="id" reporter:datatype="id" />
3828                         <field name="note"  reporter:datatype="text"/>
3829                         <field name="payment_ts" reporter:datatype="timestamp"/>
3830                         <field name="xact" reporter:datatype="link"/>
3831                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3832                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3833                 </fields>
3834                 <links>
3835                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3836                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3837                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3838                 </links>
3839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3840             <actions>
3841                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3842                     <context link="xact" jump="usr" field="home_ou"/>
3843                 </retrieve>
3844                         </actions>
3845                 </permacrud>
3846         </class>
3847         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3848                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3849                         <field name="accepting_usr" reporter:datatype="link"/>
3850                         <field name="amount" reporter:datatype="money" />
3851                         <field name="amount_collected" reporter:datatype="money" />
3852                         <field name="id" reporter:datatype="id" />
3853                         <field name="note"  reporter:datatype="text"/>
3854                         <field name="payment_ts" reporter:datatype="timestamp"/>
3855                         <field name="xact" reporter:datatype="link"/>
3856                         <field name="billing" reporter:datatype="link"/>
3857                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3858                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3859                 </fields>
3860                 <links>
3861                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3862                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3863                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3864                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3865                 </links>
3866         </class>
3867         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3868                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3869                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3870                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3871                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3872                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3873                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3874                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3875                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3876                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3877                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3878                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3879                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3880                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3881                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3882                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3883                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3884                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3885                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3886                 </fields>
3887                 <links>
3888                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3889                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3890                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3891                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3892                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3893                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3894                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3895                 </links>
3896         </class>
3897
3898         <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">
3899                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3900                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3901                         <field name="name"  reporter:datatype="text"/>
3902                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3903                         <field name="block_list" reporter:datatype="text"/>
3904                         <field name="staff_alert" reporter:datatype="bool"/>
3905                         <field name="org_depth" reporter:datatype="int"/>
3906                         <field name="ignore_proximity" reporter:datatype="int"/>
3907                 </fields>
3908                 <links/>
3909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3910             <actions>
3911                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3912                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3913                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3914                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3915             </actions>
3916         </permacrud>
3917         </class>
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3920                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3921                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3922                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3923                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3924                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3925                 </fields>
3926                 <links>
3927                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3928                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3929                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3930         </links>
3931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3932             <actions>
3933                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3934                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3935                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3936                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3937             </actions>
3938         </permacrud>
3939         </class>
3940         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
3941                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3942                         <field name="holdable" reporter:datatype="bool"/>
3943                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3944                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3945                         <field name="opac_visible" reporter:datatype="bool"/>
3946             <field name="copy_active" reporter:datatype="bool"/>
3947             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3948             <field name="is_available" reporter:datatype="bool"/>
3949                 </fields>
3950                 <links/>
3951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3952             <actions>
3953                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3954                 <retrieve/>
3955                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3956                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3957             </actions>
3958         </permacrud>
3959         </class>
3960         <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">
3961                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3962                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3963                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3964                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3965                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3966                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3967                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3968                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3969                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3970                 </fields>
3971                 <links>
3972                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3973                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3974                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3975                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3976                 </links>
3977                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3978                         <actions>
3979                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3980                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3981                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3982                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3983                         </actions>
3984                 </permacrud>
3985         </class>
3986         <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">
3987                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3988                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3989                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3990                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3991                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3992                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3993                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3994                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3995                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3996                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3997                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3998                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3999                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4000                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4001                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4002                 </fields>
4003                 <links>
4004                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4005                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4006                 </links>
4007                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4008                         <actions>
4009                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4010                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4011                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4012                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4013                         </actions>
4014                 </permacrud>
4015         </class>
4016         <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">
4017                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4018                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4019                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4020                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4021                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4022                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4023                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4024                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4025                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4026                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4027                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4028                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4029                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4030                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4031                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4032                 </fields>
4033                 <links>
4034                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4035                 </links>
4036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4037                         <actions>
4038                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4039                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4040                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4041                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4042                         </actions>
4043                 </permacrud>
4044         </class>
4045
4046
4047         <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">
4048                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4049                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4050                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4051                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4052                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4053                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4054                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4055                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4056                 </fields>
4057                 <links>
4058                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4059                 </links>
4060         </class>
4061
4062         <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">
4063                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4064                         <field name="call_number" />
4065                         <field name="create_date" reporter:datatype="timestamp"/>
4066                         <field name="creator" reporter:datatype="link"/>
4067                         <field name="id" reporter:datatype="id" />
4068                         <field name="pub" reporter:datatype="bool"/>
4069                         <field name="title"  reporter:datatype="text"/>
4070                         <field name="value"  reporter:datatype="text"/>
4071                 </fields>
4072                 <links>
4073                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4074                 </links>
4075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4076             <actions>
4077                 <create permission="CREATE_VOLUME_NOTE">
4078                     <context link="call_number" field="owning_lib"/>
4079                 </create>
4080                 <retrieve permission="VIEW_VOLUME_NOTES">
4081                     <context link="call_number" field="owning_lib"/>
4082                 </retrieve>
4083                 <update permission="UPDATE_VOLUME_NOTE">
4084                     <context link="call_number" field="owning_lib"/>
4085                 </update>
4086                 <delete permission="DELETE_VOLUME_NOTE">
4087                     <context link="call_number" field="owning_lib"/>
4088                 </delete>
4089             </actions>
4090         </permacrud>
4091         </class>
4092         <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">
4093                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4094                         <field name="create_date" reporter:datatype="timestamp"/>
4095                         <field name="creator" reporter:datatype="link"/>
4096                         <field name="edit_date" reporter:datatype="timestamp"/>
4097                         <field name="editor" reporter:datatype="link"/>
4098                         <field name="id" reporter:datatype="id" />
4099                         <field name="record" reporter:datatype="link"/>
4100                         <field name="value" reporter:datatype="text"/>
4101                 </fields>
4102                 <links>
4103                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4104                 </links>
4105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4106             <actions>
4107                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4108                 <retrieve/>
4109                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4110                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4111             </actions>
4112         </permacrud>
4113         </class>
4114         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4115         <oils_persist:source_definition>
4116 SELECT  usr,
4117         SUM(
4118             CASE
4119                 WHEN (
4120                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4121                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4122                 ) THEN 1
4123                 ELSE 0
4124             END
4125         ) AS out,
4126
4127         SUM(
4128             CASE
4129                 WHEN (
4130                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4131                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4132                 ) THEN 1
4133                 ELSE 0
4134             END
4135         ) AS overdue,
4136
4137         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4138         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4139         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4140   FROM  action.circulation
4141   WHERE checkin_time IS NULL
4142   GROUP BY 1
4143         </oils_persist:source_definition>
4144         <fields oils_persist:primary="usr">
4145             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4146             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4147             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4148             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4149             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4150             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4151         </fields>
4152         <links>
4153             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4154         </links>
4155         </class>
4156         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4157         <oils_persist:source_definition>
4158 SELECT  usr,
4159         STRING_AGG(
4160             CASE
4161                 WHEN (
4162                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4163                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4164                 ) THEN id::TEXT
4165                 ELSE '0'
4166             END
4167         ,',') AS out,
4168
4169         STRING_AGG(
4170             CASE
4171                 WHEN (
4172                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4173                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4174                 ) THEN id::TEXT
4175                 ELSE '0'
4176             END
4177         ,',') AS overdue,
4178
4179         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4180         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4181         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4182   FROM  action.circulation
4183   WHERE checkin_time IS NULL
4184   GROUP BY 1
4185         </oils_persist:source_definition>
4186         <fields oils_persist:primary="usr">
4187             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4188             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4189             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4190             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4191             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4192             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4193         </fields>
4194         <links>
4195             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4196         </links>
4197         </class>
4198         <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">
4199                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4200                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4201                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4202                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4203                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4204                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4205                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4206                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4207                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4208                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4209                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4210                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4211                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4212                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4213                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4214                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4215                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4216                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4217                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4218                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4219                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4220                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4221                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4222                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4223                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4224                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4225                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4226                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4227                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4228                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4229                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4230                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4231                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4232                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4233                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4234                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4235                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4236                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4237                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4238                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4239                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4240                 </fields>
4241                 <links>
4242                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4243                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4244                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4245                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4246                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4247                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4248                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4249                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4250                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4251                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4252                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4253                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4254                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4255                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4256                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4257                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4258                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4259                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4260                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4261                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4262                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4263                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4264                 </links>
4265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4266                         <actions>
4267                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4268                         </actions>
4269                 </permacrud>
4270         </class>
4271         <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">
4272                 <fields>
4273                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4274                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4275                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4276                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4277                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4278                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4279                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4280                 </fields>
4281                 <links>
4282                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4283                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4284                 </links>
4285                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4286                         <actions>
4287                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4288                         </actions>
4289                 </permacrud>
4290         </class>
4291         <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="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4292                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4293                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4294                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4295                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4296                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4297                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4298                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4299                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4300                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4301                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4302                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4303                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4304                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4305                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4306                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4307                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4308                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4309                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4310                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4311                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4312                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4313                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4314                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4315                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4316                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4317                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4318                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4319                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4320                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4321                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4322                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4323                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4324                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4325                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4326                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4327                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4328                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4329                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4330                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4331                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4332                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4333                 </fields>
4334                 <links>
4335                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4336                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4337                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4338                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4339                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4340                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4341                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4342                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4343                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4344                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4345                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4346                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4347                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4348                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4349                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4350                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4351                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4352                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4353                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4354                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4355                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4356                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4357                 </links>
4358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4359                         <actions>
4360                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4361                         </actions>
4362                 </permacrud>
4363         </class>
4364
4365         <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">
4366                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4367                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4368                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4369                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4370                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4371                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4372                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4373                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4374                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4375                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4376                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4377                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4378                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4379                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4380                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4381                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4382                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4383                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4384                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4385                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4386                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4387                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4388                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4389                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4390                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4391                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4392                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4393                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4394                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4395                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4396                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4397                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4398                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4399                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4400                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4401                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4402                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4403                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4404                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4405                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4406                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4407                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4408                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4409                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4410                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4411                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4412                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4413                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4414                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4415                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4416                 </fields>
4417                 <links>
4418                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4419                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4420                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4421                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4422                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4423                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4424                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4425                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4426                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4427                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4428                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4429                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4430                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4431                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4432                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4433                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4434                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4435                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4436                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4437                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4438                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4439                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4440                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4441                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4442                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4443                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4444                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4445                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4446                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4447                 </links>
4448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4449                         <actions>
4450                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4451                         </actions>
4452                 </permacrud>
4453         </class>
4454         <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">
4455                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4456                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4457                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4458                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4459                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4460                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4461                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4462                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4463                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4464                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4465                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4466                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4467                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4468                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4469                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4470                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4471                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4472                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4473                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4474                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4475                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4476                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4477                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4478                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4479                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4480                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4481                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4482                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4483                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4484                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4485                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4486                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4487                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4488                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4489                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4490                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4491                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4492                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4493                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4494                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4495                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4496                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4497                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4498                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4499                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4500                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4501                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4502                 </fields>
4503                 <links>
4504                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4505                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4506                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4507                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4508                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4509                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4510                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4511                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4512                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4513                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4514                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4515                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4516                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4517                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4518                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4519                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4520                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4521                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4522                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4523                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4524                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4525                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4526                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4527                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4528                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4529                 </links>
4530         </class>
4531         <class id="auch" 
4532                 controller="open-ils.cstore" 
4533                 oils_obj:fieldmapper="action::user_circ_history" 
4534                 oils_persist:tablename="action.usr_circ_history" 
4535                 reporter:label="User Checkout History">
4536                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4537                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4538                         <!-- prevent reporting on the user that owns the checkout history -->
4539                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4540                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4541                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4542                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4543                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4544                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4545                 </fields>
4546                 <links>
4547                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4548                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4549                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4550                 </links>
4551         </class>
4552         <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">
4553                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4554                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4555                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4556                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4557                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4558                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4559                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4560                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4561                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4562                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4563                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4564                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4565                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4566                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4567                 </fields>
4568                 <links>
4569                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4570                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4571                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4572                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4573                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4574                 </links>
4575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4576                         <actions>
4577                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4578                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4579                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4580                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4581                         </actions>
4582                 </permacrud>
4583         </class>
4584
4585         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4586                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4587                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4588                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4589                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4590                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4591                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4592                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4593                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4594                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4595                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4596                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4597                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4598                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4599                 </fields>
4600                 <links>
4601                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4602                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4603                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4604                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4605                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4606                 </links>
4607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4608                         <actions>
4609                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4610                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4611                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4612                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4613                         </actions>
4614                 </permacrud>
4615         </class>
4616         
4617         <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">
4618                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4619                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4620                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4621                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4622                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4623                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4624                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4625                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4626                 </fields>
4627                 <links>
4628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4629                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4630                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4631                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4632                 </links>
4633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4634                         <actions>
4635                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4636                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4637                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4638                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4639                         </actions>
4640                 </permacrud>
4641         </class>
4642         
4643         <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">
4644                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4645                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4646                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4647                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4648                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4649                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4650                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4651                 </fields>
4652                 <links>
4653                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4654                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4655                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4656                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4657                 </links>
4658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4659                         <actions>
4660                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4661                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4662                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4663                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4664                         </actions>
4665                 </permacrud>
4666         </class>
4667         
4668         <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">
4669                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4670                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4671                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4672                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4673                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4674                 </fields>
4675                 <links>
4676                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4677                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4678                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4679                 </links>
4680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4681                         <actions>
4682                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4683                     <context link="resource" field="owner" />
4684                 </create>
4685                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4686                     <context link="resource" field="owner" />
4687                 </retrieve>
4688                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4689                     <context link="resource" field="owner" />
4690                 </update>
4691                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4692                     <context link="resource" field="owner" />
4693                 </delete>
4694                         </actions>
4695                 </permacrud>
4696         </class>
4697         
4698         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4699                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4700                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4701                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4702                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4703                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4704                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4705                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4706                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4707                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4708                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4709                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4710                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4711                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4712                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4713                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4715                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4716                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4717                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4718                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4719                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4720                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4721                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4722                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4723                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4724                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4725                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4726                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4727                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4728                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4729                 </fields>
4730                 <links>
4731                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4732                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4733                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4734                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4735                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4736                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4737                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4738                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4739                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4740                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4741                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4742                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4743                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4744                 </links>
4745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4746                         <actions>
4747                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4748                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4749                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4750                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4751                         </actions>
4752                 </permacrud>
4753         </class>
4754         
4755         <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">
4756                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4757                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4758                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4759                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4760                 </fields>
4761                 <links>
4762                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4763                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4764                 </links>
4765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4766                         <actions>
4767                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4768                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4769                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4770                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4771                         </actions>
4772                 </permacrud>
4773         </class>
4774
4775         <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">
4776                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4777                         <field name="bucket" reporter:datatype="link"/>
4778                         <field name="id" reporter:datatype="id" />
4779                         <field name="target_call_number" reporter:datatype="link" />
4780                         <field name="create_time" reporter:datatype="timestamp" />
4781                         <field name="pos" reporter:datatype="int" />
4782                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4783                 </fields>
4784                 <links>
4785                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4786                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4787             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4788                 </links>
4789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4790                         <actions>
4791                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
4792                     <context link="bucket" owning_lib="owning_lib"/>
4793                 </retrieve>
4794             </actions>
4795         </permacrud>
4796         </class>
4797         <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">
4798                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4799                         <field name="id" reporter:datatype="id" />
4800                         <field name="item" reporter:datatype="link"/>
4801                         <field name="note" reporter:datatype="text" />
4802                 </fields>
4803                 <links>
4804                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4805                 </links>
4806         </class>
4807         <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">
4808                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4809                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4810                         <field name="btype" reporter:datatype="text"/>
4811                         <field name="id" reporter:datatype="id" />
4812                         <field name="name" reporter:datatype="text"/>
4813                         <field name="description" reporter:datatype="text"/>
4814                         <field name="owner" reporter:datatype="link"/>
4815                         <field name="pub" reporter:datatype="bool"/>
4816                         <field name="create_time" reporter:datatype="timestamp" />
4817                         <field name="owning_lib" reporter:datatype="org_unit" />
4818                 </fields>
4819                 <links>
4820                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4821                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4822                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4823                 </links>
4824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4825                         <actions>
4826                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4827                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4828                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4829                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4830                         </actions>
4831                 </permacrud>
4832         </class>
4833         <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">
4834                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4835                         <field name="id" reporter:datatype="id" />
4836                         <field name="bucket" reporter:datatype="link"/>
4837                         <field name="note" reporter:datatype="text" />
4838                 </fields>
4839                 <links>
4840                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4841                 </links>
4842         </class>
4843         <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">
4844                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4845                         <field name="hold" reporter:datatype="link"/>
4846                         <field name="id" reporter:datatype="id" />
4847                         <field name="target_copy" reporter:datatype="link"/>
4848                         <field name="proximity" reporter:datatype="number"/>
4849                 </fields>
4850                 <links>
4851                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4852                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4853                 </links>
4854         </class>
4855         <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">
4856                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4857                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4858                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4859                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4860                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4861                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4862                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4863                 </fields>
4864                 <links>
4865                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4866                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4867                 </links>
4868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4869             <actions>
4870                 <create permission="CREATE_HOLD_NOTIFICATION">
4871                                         <context link="hold" jump="usr" field="home_ou" />
4872                                 </create>
4873                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4874                                         <context link="hold" jump="usr" field="home_ou" />
4875                                 </retrieve>
4876                 <update permission="CREATE_HOLD_NOTIFICATION">
4877                                         <context link="hold" jump="usr" field="home_ou" />
4878                                 </update>
4879                 <delete permission="CREATE_HOLD_NOTIFICATION">
4880                                         <context link="hold" jump="usr" field="home_ou" />
4881                                 </delete>
4882             </actions>
4883         </permacrud>
4884         </class>
4885         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
4886                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4887                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4888                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4889                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4890                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4891                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4892                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4893                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4894                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4895                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4896                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4897                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4898                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4899                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4900                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4901                 </fields>
4902                 <links>
4903                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4904                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4905                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4906                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4907                 </links>
4908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4909             <actions>
4910                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4911                 <retrieve/>
4912                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4913                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4914             </actions>
4915         </permacrud>
4916         </class>
4917         <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">
4918                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4919                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4920                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4921                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4922                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4923             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4924             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4925             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4926                 </fields>
4927                 <links>
4928                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4929                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4930                 </links>
4931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4932             <actions>
4933                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4934                 <retrieve/>
4935                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4936                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4937             </actions>
4938         </permacrud>
4939         </class>
4940         <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">
4941                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4942                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4943             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4944             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4945                 </fields>
4946                 <links>
4947                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4948                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4949                 </links>
4950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4951             <actions>
4952                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4953                                         <context link="lgroup" field="owner" />
4954                 </create>
4955                 <retrieve/>
4956                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4957                                         <context link="lgroup" field="owner" />
4958                 </update>
4959                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4960                                         <context link="lgroup" field="owner" />
4961                 </delete>
4962             </actions>
4963         </permacrud>
4964         </class>
4965
4966     <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">
4967         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4968             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4969             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4970             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4971             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4972         </fields>
4973         <links>
4974             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4975             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4976         </links>
4977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4978             <actions>
4979                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4980                 <retrieve/>
4981                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4982                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4983             </actions>
4984         </permacrud>
4985     </class>
4986
4987         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4988                 <fields>
4989                         <field name="sre_id" oils_persist:virtual="true" />
4990                         <field name="location" oils_persist:virtual="true" />
4991                         <field name="owning_lib" oils_persist:virtual="true" />
4992                         <field name="basic_holdings" oils_persist:virtual="true" />
4993                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4994                         <field name="supplement_holdings" oils_persist:virtual="true" />
4995                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4996                         <field name="index_holdings" oils_persist:virtual="true" />
4997                         <field name="index_holdings_add" oils_persist:virtual="true" />
4998                         <field name="online" oils_persist:virtual="true" />
4999                         <field name="missing" oils_persist:virtual="true" />
5000                         <field name="incomplete" oils_persist:virtual="true" />
5001                 </fields>
5002         </class>
5003
5004         <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">
5005                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5006                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5007                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5008                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5009                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5010                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5011                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5012                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5013                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5014                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5015                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5016                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5017                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5018                 </fields>
5019                 <links>
5020                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5021                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5022                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5023                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5024                 </links>
5025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5026                         <actions>
5027                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5028                                 <retrieve/>
5029                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5030                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5031                         </actions>
5032                 </permacrud>
5033         </class>
5034
5035         <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">
5036                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5037                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5038                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5039                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5040                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5041                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5042                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5043                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5044                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5045                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5046                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5047                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5048                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5049                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5050                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5051                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5052                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5053                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5054                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5055                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5056                 </fields>
5057                 <links>
5058                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5059                 </links>
5060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5061                         <actions>
5062                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5063                                         <context link="subscription" field="owning_lib" />
5064                                 </create>
5065                                 <retrieve />
5066                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5067                                         <context link="subscription" field="owning_lib" />
5068                                 </update>
5069                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5070                                         <context link="subscription" field="owning_lib" />
5071                                 </delete>
5072                         </actions>
5073                 </permacrud>
5074         </class>
5075
5076         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5077                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5078                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5079                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5080                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5081                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5082                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5083                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5084                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5085                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5086                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5087                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5088                 </fields>
5089                 <links>
5090                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5091                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5092                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5093                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5094                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5095                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5096                 </links>
5097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5098                         <actions>
5099                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5100                                 <retrieve />
5101                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5102                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5103                         </actions>
5104                 </permacrud>
5105         </class>
5106
5107         <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">
5108                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5109                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5110                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5111                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5112                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5113                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5114                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5115                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5116                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5117                 </fields>
5118                 <links>
5119                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5120                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5121                 </links>
5122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5123                         <actions>
5124                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5125                     <context link="subscription" field="owning_lib"/>
5126                 </create>
5127                                 <retrieve />
5128                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5129                     <context link="subscription" field="owning_lib"/>
5130                 </update>
5131                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5132                     <context link="subscription" field="owning_lib"/>
5133                 </delete>
5134                         </actions>
5135                 </permacrud>
5136         </class>
5137
5138         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5139                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5140                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5141                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5142                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5143                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5144                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5145                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5146                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5147                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5148                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5149                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5150                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5151                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5152                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5153                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5154                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5155                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5156                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5157                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5158                 </fields>
5159                 <links>
5160                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5161                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5162                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5163                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5164                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5165                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5166                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5167                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5168                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5169                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5170                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5171                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5172                 </links>
5173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5174                         <actions>
5175                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5176                                 <retrieve />
5177                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5178                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5179                         </actions>
5180                 </permacrud>
5181         </class>
5182
5183         <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">
5184                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5185                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5186                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5187                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5188                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5189                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5190                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5191                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5192                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5193                 </fields>
5194                 <links>
5195                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5196                         <link field="creator" 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                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5201                                         <context link="distribution" field="holding_lib" />
5202                                 </create>
5203                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5204                                         <context link="distribution" field="holding_lib" />
5205                                 </retrieve>
5206                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5207                                         <context link="distribution" field="holding_lib" />
5208                                 </update>
5209                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5210                                         <context link="distribution" field="holding_lib" />
5211                                 </delete>
5212                         </actions>
5213                 </permacrud>
5214         </class>
5215
5216         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5217                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5218                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5219                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5220                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5221                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5222                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5223                 </fields>
5224                 <links>
5225                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5226                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5227                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5228                 </links>
5229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5230                         <actions>
5231                                 <create permission="ADMIN_SERIAL_STREAM">
5232                                         <context link="distribution" field="holding_lib" />
5233                                 </create>
5234                                 <retrieve />
5235                                 <update permission="ADMIN_SERIAL_STREAM">
5236                                         <context link="distribution" field="holding_lib" />
5237                                 </update>
5238                                 <delete permission="ADMIN_SERIAL_STREAM">
5239                                         <context link="distribution" field="holding_lib" />
5240                                 </delete>
5241                         </actions>
5242                 </permacrud>
5243         </class>
5244
5245         <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">
5246                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5247                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5248                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5249                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5250                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5251                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5252                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5253                 </fields>
5254                 <links>
5255                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5256                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5257                 </links>
5258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5259                         <actions>
5260                                 <create permission="ADMIN_SERIAL_STREAM">
5261                                         <context link="stream" jump="distribution" field="holding_lib" />
5262                                 </create>
5263                                 <retrieve permission="RECEIVE_SERIAL">
5264                                         <context link="stream" jump="distribution" field="holding_lib" />
5265                                 </retrieve>
5266                                 <update permission="ADMIN_SERIAL_STREAM">
5267                                         <context link="stream" jump="distribution" field="holding_lib" />
5268                                 </update>
5269                                 <delete permission="ADMIN_SERIAL_STREAM">
5270                                         <context link="stream" jump="distribution" field="holding_lib" />
5271                                 </delete>
5272                         </actions>
5273                 </permacrud>
5274         </class>
5275
5276         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5277                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5278                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5279                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5280                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5281                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5282                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5283                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5284                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5285                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5286                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5287                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5288                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5289                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5290                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5291                 </fields>
5292                 <links>
5293                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5294                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5295                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5296                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5297                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5298                 </links>
5299                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5300                         <actions>
5301                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5302                                         <context link="subscription" field="owning_lib" />
5303                                 </create>
5304                                 <retrieve/>
5305                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5306                                         <context link="subscription" field="owning_lib" />
5307                                 </update>
5308                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5309                                         <context link="subscription" field="owning_lib" />
5310                                 </delete>
5311                         </actions>
5312                 </permacrud>
5313         </class>
5314
5315         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5316                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5318                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5319                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5320                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5321                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5322                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5323                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5324                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5325                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5326                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5327                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5328                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5329                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5330                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5331                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5332                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5333                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5334                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5335                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5336                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5337                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5338                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5339                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5340                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5341                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5342                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5343                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5344                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5345                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5346                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5347                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5348                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5349                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5350                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5351                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5352                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5353                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5354                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5355                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5356                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5357                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5358                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5359                 </fields>
5360                 <links>
5361                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5362                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5363                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5364                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5365                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5366                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5367                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5368                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5369                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5370                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5371                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5372                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5373                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5374                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5375                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5376                 </links>
5377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5378                         <actions>
5379                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5380                                 <retrieve/>
5381                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5382                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5383                         </actions>
5384                 </permacrud>
5385         </class>
5386
5387         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5388                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5389                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5390                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5391                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5392                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5393                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5394                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5395                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5396                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5397                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5398                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5399                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5400                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5401                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5402                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5403                 </fields>
5404                 <links>
5405                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5406                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5407                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5408                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5409                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5410                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5411                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5412                 </links>
5413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5414                         <actions>
5415                                 <create permission="ADMIN_SERIAL_ITEM">
5416                                         <context link="stream" jump="distribution" field="holding_lib" />
5417                                 </create>
5418                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5419                                         <context link="stream" jump="distribution" field="holding_lib" />
5420                                 </retrieve>
5421                                 <update permission="ADMIN_SERIAL_ITEM">
5422                                         <context link="stream" jump="distribution" field="holding_lib" />
5423                                 </update>
5424                                 <delete permission="ADMIN_SERIAL_ITEM">
5425                                         <context link="stream" jump="distribution" field="holding_lib" />
5426                                 </delete>
5427                         </actions>
5428                 </permacrud>
5429         </class>
5430
5431         <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">
5432                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5433                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5434                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5435                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5436                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5437                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5438                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5439                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5440                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5441                 </fields>
5442                 <links>
5443                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5444                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5445                 </links>
5446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5447                         <actions>
5448                                 <create permission="ADMIN_SERIAL_ITEM">
5449                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5450                                 </create>
5451                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5452                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5453                                 </retrieve>
5454                                 <update permission="ADMIN_SERIAL_ITEM">
5455                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5456                                 </update>
5457                                 <delete permission="ADMIN_SERIAL_ITEM">
5458                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5459                                 </delete>
5460                         </actions>
5461                 </permacrud>
5462         </class>
5463         <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">
5464                 <fields>
5465                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5466                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5467                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5468                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5469                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5470                 </fields>
5471                 <links>
5472                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5473                 </links>
5474         </class>
5475         <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">
5476                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5477                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5478                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5479                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5480                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5481                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5482                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5483                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5484                 </fields>
5485                 <links>
5486                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5487                 </links>
5488         </class>
5489         <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">
5490                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5491                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5492                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5493                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5494                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5495                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5496                 </fields>
5497                 <links>
5498                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5499                 </links>
5500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5501                         <actions>
5502                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5503                                         <context link="distribution" field="holding_lib" />
5504                                 </create>
5505                                 <retrieve/>
5506                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5507                                         <context link="distribution" field="holding_lib" />
5508                                 </update>
5509                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5510                                         <context link="distribution" field="holding_lib" />
5511                                 </delete>
5512                         </actions>
5513                 </permacrud>
5514         </class>
5515
5516         <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">
5517                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5518                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5519                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5520                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5521                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5522                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5523                 </fields>
5524                 <links>
5525                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5526                 </links>
5527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5528                         <actions>
5529                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5530                                         <context link="distribution" field="holding_lib" />
5531                                 </create>
5532                                 <retrieve/>
5533                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5534                                         <context link="distribution" field="holding_lib" />
5535                                 </update>
5536                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5537                                         <context link="distribution" field="holding_lib" />
5538                                 </delete>
5539                         </actions>
5540                 </permacrud>
5541         </class>
5542
5543         <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">
5544                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5545                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5546                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5547                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5548                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5549                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5550                 </fields>
5551                 <links>
5552                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5553                 </links>
5554                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5555                         <actions>
5556                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5557                                         <context link="distribution" field="holding_lib" />
5558                                 </create>
5559                                 <retrieve/>
5560                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5561                                         <context link="distribution" field="holding_lib" />
5562                                 </update>
5563                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5564                                         <context link="distribution" field="holding_lib" />
5565                                 </delete>
5566                         </actions>
5567                 </permacrud>
5568         </class>
5569
5570         <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">
5571                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5572                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5573                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5574                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5575                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5576                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5577                 </fields>
5578                 <links>
5579                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5580                 </links>
5581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5582                         <actions>
5583                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5584                                 <retrieve/>
5585                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5586                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5587                         </actions>
5588                 </permacrud>
5589         </class>
5590
5591         <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">
5592                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5593                         <field name="id" reporter:datatype="id" />
5594                         <field name="owning_copy" reporter:datatype="link"/>
5595                         <field name="stat_cat" reporter:datatype="link"/>
5596                         <field name="stat_cat_entry" reporter:datatype="link"/>
5597                 </fields>
5598                 <links>
5599                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5600                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5601                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5602                 </links>
5603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5604                         <actions>
5605                                 <retrieve/>
5606                         </actions>
5607                 </permacrud>
5608         </class>
5609         <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">
5610                 <fields oils_persist:primary="code">
5611                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5612                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5613                 </fields>
5614                 <links/>
5615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5616             <actions>
5617                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5618                 <retrieve/>
5619                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5620                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5621             </actions>
5622         </permacrud>
5623         </class>
5624         <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">
5625                 <fields oils_persist:primary="code">
5626                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5627                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5628                 </fields>
5629                 <links/>
5630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5631             <actions>
5632                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5633                 <retrieve/>
5634                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5635                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5636             </actions>
5637         </permacrud>
5638         </class>
5639         <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">
5640                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5641                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5642                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5643                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5644                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5645                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5646                 </fields>
5647                 <links>
5648             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5649         </links>
5650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5651             <actions>
5652                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5653                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5654                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5655                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5656             </actions>
5657         </permacrud>
5658         </class>
5659         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
5660                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5661                         <field name="id" reporter:datatype="id" />
5662                         <field name="name" reporter:datatype="text"/>
5663                 </fields>
5664                 <links/>
5665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5666             <actions>
5667                 <create permission="CREATE_LASSO" global_required="true"/>
5668                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5669                 <update permission="UPDATE_LASSO" global_required="true"/>
5670                 <delete permission="DELETE_LASSO" global_required="true"/>
5671             </actions>
5672         </permacrud>
5673         </class>
5674         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
5675                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5676                         <field name="id" reporter:datatype="id" />
5677                         <field name="lasso" reporter:datatype="link"/>
5678                         <field name="org_unit" reporter:datatype="org_unit"/>
5679                 </fields>
5680                 <links>
5681                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5682                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5683                 </links>
5684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5685             <actions>
5686                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5687                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5688                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5689                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5690             </actions>
5691         </permacrud>
5692         </class>
5693         <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">
5694                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5695                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5696                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5697                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5698                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5699                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5700                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5701                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5702                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5703                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5704                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5705                 </fields>
5706                 <links>
5707                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5708                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5709                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5710                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5711                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5712                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5713                 </links>
5714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5715             <actions>
5716                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5717                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5718                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5719                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5720             </actions>
5721         </permacrud>
5722         </class>
5723         <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">
5724                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5725                         <field name="id" reporter:datatype="id" />
5726                         <field name="from_org" reporter:datatype="org_unit"/>
5727                         <field name="to_org" reporter:datatype="org_unit"/>
5728                         <field name="prox" reporter:datatype="int" />
5729                 </fields>
5730                 <links>
5731                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5732                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5733                 </links>
5734         </class>
5735         <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">
5736                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5737                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5738                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5739                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5740                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5741                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5742                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5743                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5744                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5745                 </fields>
5746                 <links/>
5747         </class>
5748         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5750                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5751                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5752                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5753                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5754                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5755                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5756                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5757                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5758                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5759                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5760                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5761                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5762                 </fields>
5763                 <links>
5764                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5765                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5766                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5767                 </links>
5768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5769             <actions>
5770                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5771                 <retrieve/>
5772                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5773                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5774             </actions>
5775         </permacrud>
5776         </class>
5777         <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">
5778                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5779                         <field name="address_type"  reporter:datatype="text"/>
5780                         <field name="city"  reporter:datatype="text"/>
5781                         <field name="country"  reporter:datatype="text"/>
5782                         <field name="county"  reporter:datatype="text"/>
5783                         <field name="id" reporter:datatype="id" />
5784                         <field name="org_unit" reporter:datatype="org_unit"/>
5785                         <field name="post_code"  reporter:datatype="text"/>
5786                         <field name="state"  reporter:datatype="text"/>
5787                         <field name="street1"  reporter:datatype="text"/>
5788                         <field name="street2"  reporter:datatype="text"/>
5789                         <field name="valid" reporter:datatype="bool"/>
5790                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5791                 </fields>
5792                 <links>
5793                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5794                 </links>
5795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5796             <actions>
5797                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5798                 <retrieve/>
5799                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5800                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5801             </actions>
5802         </permacrud>
5803         </class>
5804         <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">
5805                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5806                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5807                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5808                         <field name="query_text" reporter:datatype="text"/>
5809                 </fields>
5810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5811             <actions>
5812                 <retrieve/>
5813             </actions>
5814         </permacrud>
5815         </class>
5816
5817         <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">
5818                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5819                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5820                         <field name="owner" reporter:datatype="org_unit"/>
5821                         <field name="code" reporter:datatype="text"/>
5822                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5823                         <field name="create_date" reporter:datatype="timestamp"/>
5824                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5825                 </fields>
5826                 <links>
5827                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5828                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5829                 </links>
5830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5831             <actions>
5832                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5833                 <retrieve/>
5834                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5835                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5836             </actions>
5837         </permacrud>
5838         </class>
5839         <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">
5840                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5841                         <field name="id" reporter:datatype="id"/>
5842                         <field name="grp" reporter:datatype="link"/>
5843                         <field name="pos" reporter:datatype="int"/>
5844                         <field name="query" reporter:datatype="link"/>
5845                 </fields>
5846                 <links>
5847                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5848                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5849                 </links>
5850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5851             <actions>
5852                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5853                     <context link="grp" field="owner"/>
5854                 </create>
5855                 <retrieve/>
5856                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5857                     <context link="grp" field="owner"/>
5858                 </update>
5859                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5860                     <context link="grp" field="owner"/>
5861                 </delete>
5862             </actions>
5863         </permacrud>
5864         </class>
5865
5866         <!-- A note: Please update alhr and ahopl when updating ahr -->
5867         <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">
5868                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5869                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5870                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5871                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5872                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5873                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5874                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5875                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5876                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5877                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5878                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5879                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5880                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5881                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5882                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5883                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5884                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5885                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5886                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5887                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5888                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5889                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5890                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5891                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5892                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5893                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5894                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5895                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5896                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5897                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5898                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5899                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5900                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5901                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5902                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5903                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5904                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5905                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5906                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5907                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5908                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5909                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5910                 </fields>
5911                 <links>
5912                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5913                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5914                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5915                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5916                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5917                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5918                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5919                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5920                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5921                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5922                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5923                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5924                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5925                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5926                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5927                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5928                 </links>
5929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5930                         <actions>
5931                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5932                         </actions>
5933                 </permacrud>
5934         </class>
5935         <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">
5936                 <oils_persist:source_definition><![CDATA[
5937                 SELECT
5938                         ahr.*,
5939                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5940                                 copy_location_order_position,
5941                         CASE WHEN au.alias IS NOT NULL THEN
5942                                 au.alias
5943                         ELSE
5944                                 au.first_given_name
5945                         END AS usr_alias_or_first_given_name,
5946                         au.first_given_name AS usr_first_given_name,
5947                         au.second_given_name AS usr_second_given_name,
5948                         au.family_name AS usr_family_name,
5949                         au.prefix AS usr_prefix,
5950                         au.suffix AS usr_suffix,
5951                         au.alias AS usr_alias,
5952                         CASE WHEN au.alias IS NOT NULL THEN
5953                                 au.alias
5954                         ELSE
5955                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5956                                         COALESCE(au.family_name, ''),
5957                                         COALESCE(au.suffix, ''),
5958                                         ', ',
5959                                         COALESCE(au.prefix, ''),
5960                                         COALESCE(au.first_given_name, ''),
5961                                         COALESCE(au.second_given_name, '')
5962                                 ], ' '), E'\\s+,', ',')
5963                         END AS usr_alias_or_display_name,
5964                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5965                                 COALESCE(au.family_name, ''),
5966                                 COALESCE(au.suffix, ''),
5967                                 ', ',
5968                                 COALESCE(au.prefix, ''),
5969                                 COALESCE(au.first_given_name, ''),
5970                                 COALESCE(au.second_given_name, '')
5971                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5972                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5973                                 AS call_number_label,
5974                         siss.label AS issuance_label,
5975                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5976                         ahcm_1.copy_count AS potential_copies
5977                 FROM action.hold_request ahr
5978                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5979                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5980                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5981                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5982                 JOIN actor.usr au ON (au.id = ahr.usr)
5983                 JOIN (
5984                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5985                         FROM asset.copy_location
5986                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5987                 LEFT JOIN actor.usr_standing_penalty ausp 
5988                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5989                 LEFT JOIN config.standing_penalty csp
5990                         ON (
5991                                 csp.id = ausp.standing_penalty AND 
5992                                 csp.block_list LIKE '%CAPTURE%' AND (
5993                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5994                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5995                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5996                                         )
5997                                 )
5998                         )
5999                 JOIN (
6000                         SELECT COUNT(target_copy) AS copy_count, hold
6001                         FROM action.hold_copy_map
6002                         GROUP BY 2
6003                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6004                 LEFT JOIN serial.issuance siss
6005                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6006                 LEFT JOIN asset.copy_location_order acplo
6007                         ON (acp.location = acplo.location AND
6008                                 acp.circ_lib = acplo.org)
6009                 WHERE
6010                         ahr.capture_time IS NULL AND
6011                         ahr.cancel_time IS NULL AND
6012                         csp.id IS NULL AND
6013                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6014                         acp.status IN (0,7)
6015                 ]]></oils_persist:source_definition>
6016                 <fields oils_persist:primary="id">
6017                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6018                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6019                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6020                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6021                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6022                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6023                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6024                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6025                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6026                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6027                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6028                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6029                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6030                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6031                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6032                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6033                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6034                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6035                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6036                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6037                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6038                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6039                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6040                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6041                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6042                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6043                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6044                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6045                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6046                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6047                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6048                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6049                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6050                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6051                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6052                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6053                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6054                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6055                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6056                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6057                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6058                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6059                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6060                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6061                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6062                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6063                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6064                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6065                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6066                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6067                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6068                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6069                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6070                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6071                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6072                 </fields>
6073                 <links>
6074                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6075                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6076                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6077                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6078                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6079                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6080                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6081                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6082                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6083                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6084                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6085                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6086                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6087                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6088                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6089                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6090                 </links>
6091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6092                         <actions>
6093                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6094                         </actions>
6095                 </permacrud>
6096         </class>
6097         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6098                 <oils_persist:source_definition>
6099                         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)
6100                 </oils_persist:source_definition>
6101                 <fields oils_persist:primary="id">
6102                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6103                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6104                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6105                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6106                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6107                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6108                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6109                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6110                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6111                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6112                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6113                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6114                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6115                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6116                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6117                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6118                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6119                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6120                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6121                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6122                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6123                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6124                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6125                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6126                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6127                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6128                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6129                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6130                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6131                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6132                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6133                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6134                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6135                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6136                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6137                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6138                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6139                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6140                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6141                 </fields>
6142                 <links>
6143                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6144                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6145                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6146                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6147                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6148                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6149                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6150                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6151                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6152                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6153                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6154                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6155                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6156                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6157                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6158                 </links>
6159         </class>
6160
6161         <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">
6162                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6163                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6164                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6165                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6166                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6167                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6168                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6169                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6170                 </fields>
6171                 <links>
6172                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6173                 </links>
6174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6175                         <actions>
6176                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6177                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6178                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6179                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6180                         </actions>
6181                 </permacrud>
6182         </class>
6183         <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">
6184                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6185                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6186                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6187                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6188                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6189                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6190                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6191                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6192                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6193                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6194                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6195                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6196                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6197                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6198                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6199                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6200                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6201                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6202                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6203                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6204                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6205                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6206                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6207                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6208                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6209                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6210                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6211                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6212                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6213                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6214                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6215                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6216                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6217                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6218                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6219                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6220                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6221                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6222                 </fields>
6223                 <links>
6224                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6225                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6226                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6227                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6228                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6229                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6230                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6231                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6232                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6233                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6234                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6235                 </links>
6236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6237                         <actions>
6238                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6239                         </actions>
6240                 </permacrud>
6241         </class>
6242         <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">
6243                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6244                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6245                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6246                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6247                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6248                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6249                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6250                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6251                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6252                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6253                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6254                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6255                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6256                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6257                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6258                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6259                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6260                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6261                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6262                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6263                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6264                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6265                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6266                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6267                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6268                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6269                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6270                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6271                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6272                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6273                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6274                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6275                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6276                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6277                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6278                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6279                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6280                 </fields>
6281                 <links>
6282                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6283                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6284                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6285                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6286                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6287                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6288                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6289                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6290                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6291                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6292                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6293                 </links>
6294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6295                         <actions>
6296                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6297                         </actions>
6298                 </permacrud>
6299         </class>
6300
6301         <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">
6302                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6303                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6304                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6305                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6306                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6307                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6308                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6309                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6310                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6311                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6312                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6313                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6314                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6315                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6316                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6317                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6318                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6319                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6320                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6321                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6322                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6323                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6324                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6325                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6326                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6327                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6328                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6329                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6330                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6331                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6332                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6333                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6334                 </fields>
6335                 <links>
6336                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6337                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6338                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6339                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6340                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6341                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6342                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6343                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6344                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6345                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6346                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6347                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6348                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6349                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6350                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6351                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6352                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6353                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6354                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6355                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6356                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6357                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6358                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6359                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6360                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6361                 </links>
6362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6363             <actions>
6364                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6365                 <retrieve />
6366                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6367                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6368             </actions>
6369         </permacrud>
6370         </class>
6371         <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">
6372                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6373                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6374                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6375                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6376                 </fields>
6377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6378                         <actions>
6379                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6380                                 <retrieve/>
6381                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6382                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6383                         </actions>
6384                 </permacrud>
6385         </class>
6386         <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">
6387                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6388                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6389                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6390                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6391                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6392                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6393                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6394                 </fields>
6395                 <links>
6396                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6397                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6398                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6399                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6400                 </links>
6401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6402                         <actions>
6403                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6404                                 <retrieve/>
6405                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6406                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6407                         </actions>
6408                 </permacrud>
6409         </class>
6410         <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">
6411                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6412                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6413                         <field name="btype" reporter:datatype="text"/>
6414                         <field name="id" reporter:datatype="id" />
6415                         <field name="name"  reporter:datatype="text"/>
6416                         <field name="description" reporter:datatype="text"/>
6417                         <field name="owner" reporter:datatype="link"/>
6418                         <field name="pub" reporter:datatype="bool"/>
6419                         <field name="create_time" reporter:datatype="timestamp" />
6420                         <field name="owning_lib" reporter:datatype="org_unit" />
6421                 </fields>
6422                 <links>
6423                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6424                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6425                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6426                 </links>
6427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6428                         <actions>
6429                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6430                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6431                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6432                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6433                         </actions>
6434                 </permacrud>
6435         </class>
6436         <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">
6437                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6438                         <field name="id" reporter:datatype="id" />
6439                         <field name="bucket" reporter:datatype="link"/>
6440                         <field name="note" reporter:datatype="text" />
6441                 </fields>
6442                 <links>
6443                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6444                 </links>
6445         </class>
6446         <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">
6447                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6448                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6449                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6450                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6451                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6452                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6453                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6454                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6455                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6456                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6457                 </fields>
6458                 <links>
6459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6460                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6461                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6462                 </links>
6463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6464                         <actions>
6465                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6466                         </actions>
6467                 </permacrud>
6468         </class>
6469         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6470                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6471                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6472                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6473                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6474                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6475                 </fields>
6476                 <links>
6477                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6478                 </links>
6479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6480                         <actions>
6481                                 <retrieve permission="VIEW_USER">
6482                                         <context link="usr" field="home_ou" />
6483                                 </retrieve>
6484                         </actions>
6485                 </permacrud>
6486         </class>
6487     <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">
6488         <fields oils_persist:primary="field">
6489             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6490             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6491             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6492         </fields>
6493         <links/>
6494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6495             <actions>
6496                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6497                 <retrieve />
6498                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6499                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6500             </actions>
6501         </permacrud>
6502     </class>
6503         <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">
6504                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6505                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6506                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6507                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6509                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6510                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6511                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6512                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6513                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6514                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6515                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6516                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6517                 </fields>
6518                 <links>
6519                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6520                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6521                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6522                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6523                 </links>
6524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6525             <actions>
6526                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6527                 <retrieve />
6528                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6529                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6530             </actions>
6531         </permacrud>
6532         </class>
6533         <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">
6534                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6535                         <field name="field" reporter:datatype="link"/>
6536                         <field name="id" reporter:datatype="id" />
6537                         <field name="source" reporter:datatype="link"/>
6538                         <field name="value"  reporter:datatype="text"/>
6539                 </fields>
6540                 <links>
6541                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6542                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6543                 </links>
6544         </class>
6545         <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">
6546                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6547                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6548                         <field name="btype" reporter:datatype="text"/>
6549                         <field name="id" reporter:datatype="id" />
6550                         <field name="name"  reporter:datatype="text"/>
6551                         <field name="description" reporter:datatype="text"/>
6552                         <field name="owner" reporter:datatype="link"/>
6553                         <field name="pub" reporter:datatype="bool"/>
6554                         <field name="create_time" reporter:datatype="timestamp" />
6555                         <field name="owning_lib" reporter:datatype="org_unit" />
6556                 </fields>
6557                 <links>
6558                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6559                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6560                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6561                 </links>
6562                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6563                         <actions>
6564                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6565                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6566                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6567                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6568                         </actions>
6569                 </permacrud>
6570         </class>
6571         <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">
6572                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6573                         <field name="id" reporter:datatype="id" />
6574                         <field name="bucket" reporter:datatype="link"/>
6575                         <field name="note" reporter:datatype="text" />
6576                 </fields>
6577                 <links>
6578                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6579                 </links>
6580         </class>
6581         <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">
6582                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6583                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6584                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6585                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6586                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6587                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6588                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6589                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6590                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6591                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6592                 </fields>
6593                 <links>
6594                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6595                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6596                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6597                 </links>
6598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6599             <actions>
6600                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6601                     <context link="xact" jump="usr" field="home_ou"/>
6602                 </retrieve>
6603                         </actions>
6604                 </permacrud>
6605         </class>
6606         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6608                         <field name="id" reporter:datatype="id" />
6609                         <field name="ind1" />
6610                         <field name="ind2" />
6611                         <field name="record" />
6612                         <field name="subfield" />
6613                         <field name="tag" />
6614                         <field name="value" />
6615                 </fields>
6616                 <links>
6617                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6618                 </links>
6619         </class>
6620         <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">
6621                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6622                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6623                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6624                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6625                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6626                 </fields>
6627                 <links>
6628                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6629                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6630                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6631                 </links>
6632         </class>
6633         <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">
6634                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6635                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6636                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6637                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6638                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6639                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6640                 </fields>
6641                 <links>
6642                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6643                 </links>
6644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6645             <actions>
6646                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6647                 <retrieve/>
6648                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6649                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6650             </actions>
6651         </permacrud>
6652
6653         </class>
6654         <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">
6655                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6656                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6657                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6658                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6659                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6660                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6661                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6662                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6663                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6664                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6665                 </fields>
6666                 <links>
6667                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6668                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6669                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6670                 </links>
6671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6672             <actions>
6673                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6674                 <retrieve/>
6675                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6676                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6677             </actions>
6678         </permacrud>
6679         </class>
6680         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6681                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6682                         <field name="create_date" reporter:datatype="timestamp"/>
6683                         <field name="creator" reporter:datatype="link"/>
6684                         <field name="edit_date" reporter:datatype="timestamp"/>
6685                         <field name="editor" reporter:datatype="link"/>
6686                         <field name="id" reporter:datatype="id" />
6687                         <field name="pub" reporter:datatype="bool"/>
6688                         <field name="record" reporter:datatype="link"/>
6689                         <field name="value"  reporter:datatype="text"/>
6690                 </fields>
6691                 <links>
6692                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6693                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6694                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6695                 </links>
6696         </class>
6697         <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">
6698                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6699                         <field name="balance_owed" reporter:datatype="money" />
6700                         <field name="total_owed" reporter:datatype="money" />
6701                         <field name="total_paid" reporter:datatype="money" />
6702                         <field name="usr" reporter:datatype="link"/>
6703                 </fields>
6704                 <links>
6705                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6706                 </links>
6707         </class>
6708     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6709                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6710                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6711                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6712                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6714                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6715                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6716                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6717                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6718                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6719                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6720                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6721                 </fields>
6722                 <links>
6723                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6724                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6725                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6726                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6727                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6728                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6729                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6730                 </links>
6731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6732             <actions>
6733                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6734             </actions>
6735         </permacrud>
6736         </class>
6737         <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">
6738                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6739                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6740                         <field name="quality" reporter:datatype="int" />
6741                         <field name="source" reporter:datatype="text"/>
6742                         <field name="transcendant" reporter:datatype="bool"/>
6743                         <field name="can_have_copies" reporter:datatype="bool"/>
6744                 </fields>
6745                 <links/>
6746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6747             <actions>
6748                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6749                 <retrieve/>
6750                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6751                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6752             </actions>
6753         </permacrud>
6754         </class>
6755         <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">
6756                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6757                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6758                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6759                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6760                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6761                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6762                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6763                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6764                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6765                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6767                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6768                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6769                 </fields>
6770                 <links>
6771                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6772                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6773                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6774                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6775                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6776                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6777                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6778                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6779                 </links>
6780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6781                         <actions>
6782                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6783                                         <context link="usr" field="home_ou" />
6784                                 </retrieve>
6785                         </actions>
6786                 </permacrud>
6787         </class>
6788         <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">
6789                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6790                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6791                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6792                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6793                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6794                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6795                 </fields>
6796                 <links>
6797                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6798                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6799                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6800                 </links>
6801         </class>
6802         <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">
6803                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6804                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6805                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6806                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6807                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6808                 </fields>
6809                 <links>
6810                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6811                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6812                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6813                 </links>
6814         </class>
6815         <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">
6816                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6817                         <field name="bucket" reporter:datatype="link"/>
6818                         <field name="id" reporter:datatype="id" />
6819                         <field name="target_user" reporter:datatype="link"/>
6820                         <field name="create_time" reporter:datatype="timestamp" />
6821                         <field name="pos" reporter:datatype="int" />
6822                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6823                 </fields>
6824                 <links>
6825                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6826                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6827             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6828                 </links>
6829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6830                         <actions>
6831                                 <retrieve permission="ADMIN_USER_BUCKET">
6832                     <context link="bucket" owning_lib="owning_lib"/>
6833                 </retrieve>
6834             </actions>
6835         </permacrud>
6836         </class>
6837         <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">
6838                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6839                         <field name="id" reporter:datatype="id" />
6840                         <field name="item" reporter:datatype="link"/>
6841                         <field name="note" reporter:datatype="text" />
6842                 </fields>
6843                 <links>
6844                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6845                 </links>
6846         </class>
6847         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6848                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6849                         <field name="balance_owed" reporter:datatype="money" />
6850                         <field name="total_owed" reporter:datatype="money" />
6851                         <field name="total_paid" reporter:datatype="money" />
6852                         <field name="usr" reporter:datatype="link"/>
6853                 </fields>
6854                 <links>
6855                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6856                 </links>
6857         </class>
6858         <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">
6859                 <fields oils_persist:primary="code" oils_persist:sequence="">
6860                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6861                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6862                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6863                 </fields>
6864                 <links/>
6865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6866             <actions>
6867                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6868                 <retrieve/>
6869                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6870                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6871             </actions>
6872         </permacrud>
6873         </class>
6874         <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">
6875                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6876                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6877                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6878                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6879                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6880                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6881                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6882                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6883                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6884                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6885                 </fields>
6886                 <links>
6887                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6888                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6889                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6890                 </links>
6891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6892             <actions>
6893                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6894                     <context link="xact" jump="usr" field="home_ou"/>
6895                 </retrieve>
6896                         </actions>
6897                 </permacrud>
6898         </class>
6899         <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">
6900                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6901                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6902                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6903                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6904                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6905                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6906                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6907                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6908                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6909                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6910                 </fields>
6911                 <links>
6912                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6913                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6914                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6915                 </links>
6916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6917             <actions>
6918                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6919                     <context link="xact" jump="usr" field="home_ou"/>
6920                 </retrieve>
6921                         </actions>
6922                 </permacrud>
6923         </class>
6924         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6925                 <fields oils_persist:primary="id" oils_persist:sequence="">
6926                         <field name="checkin_lib" reporter:datatype="link"/>
6927                         <field name="checkin_staff" reporter:datatype="link"/>
6928                         <field name="checkin_time" reporter:datatype="timestamp"/>
6929                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6930                         <field name="circ_staff" reporter:datatype="link"/>
6931                         <field name="desk_renewal" reporter:datatype="bool"/>
6932                         <field name="due_date" reporter:datatype="timestamp"/>
6933                         <field name="duration" reporter:datatype="interval"/>
6934                         <field name="duration_rule" reporter:datatype="link"/>
6935                         <field name="fine_interval" reporter:datatype="interval"/>
6936                         <field name="id" reporter:datatype="id" />
6937                         <field name="max_fine" reporter:datatype="money" />
6938                         <field name="max_fine_rule" reporter:datatype="link"/>
6939                         <field name="opac_renewal" reporter:datatype="bool"/>
6940                         <field name="phone_renewal" reporter:datatype="bool"/>
6941                         <field name="recurring_fine" reporter:datatype="money" />
6942                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6943                         <field name="renewal_remaining" reporter:datatype="int" />
6944             <field name="grace_period" reporter:datatype="interval" />
6945                         <field name="stop_fines" reporter:datatype="text"/>
6946                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6947                         <field name="target_copy" reporter:datatype="link"/>
6948                         <field name="usr" reporter:datatype="link"/>
6949                         <field name="xact_finish" reporter:datatype="timestamp" />
6950                         <field name="xact_start" reporter:datatype="timestamp" />
6951                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6952                 </fields>
6953                 <links>
6954                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6955                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6956                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6957                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6958                 </links>
6959         </class>
6960         <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">
6961                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6962                         <field name="field" reporter:datatype="link"/>
6963                         <field name="id" reporter:datatype="id" />
6964                         <field name="source" reporter:datatype="link"/>
6965                         <field name="value" reporter:datatype="text"/>
6966                 </fields>
6967                 <links>
6968                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6969                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6970                 </links>
6971         </class>
6972         <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">
6973                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6974                         <field name="high" reporter:datatype="money" />
6975                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6976                         <field name="low" reporter:datatype="money" />
6977                         <field name="name" reporter:datatype="text"/>
6978                         <field name="normal" reporter:datatype="money" />
6979                         <field name="recurrence_interval" reporter:datatype="interval"/>
6980             <field name="grace_period" reporter:datatype="interval" />
6981                 </fields>
6982                 <links/>
6983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6984             <actions>
6985                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6986                 <retrieve/>
6987                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6988                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6989             </actions>
6990         </permacrud>
6991         </class>
6992         <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">
6993                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6994                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6995                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6996                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6997                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6998                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6999                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7000                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7001                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7002                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7003                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7004                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7005                 </fields>
7006                 <links>
7007                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7008                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7009                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7010                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7011                 </links>
7012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7013             <actions>
7014                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7015                     <context link="xact" jump="usr" field="home_ou"/>
7016                 </retrieve>
7017                         </actions>
7018                 </permacrud>
7019         </class>
7020         <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">
7021                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7022                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7023                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7024                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7025                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7026                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
7027                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7028                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7029                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7030                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7031                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7032                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7033                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7034                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7035                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7036                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7037                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7038                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7039                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7040                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7041                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7042                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7043                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7044                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7045                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7046                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7047                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7048                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7049                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7050                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7051                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7052                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7053                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7054                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7055                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7056                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7057                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7058                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7061                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7063                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7064                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7065                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7066                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7067                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7068                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7069                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7070                 </fields>
7071                 <links>
7072                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7073                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7074                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7075                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7076                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7077                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7078                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7079                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7080                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7081                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7082                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7083                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7084                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7085                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7086                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7087                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7088                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7089                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7090                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7091                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7092                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7093                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7094                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7095                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7096                 </links>
7097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7098             <actions>
7099                 <create permission="CREATE_COPY">
7100                     <context link="call_number" field="owning_lib"/>
7101                 </create>
7102                 <retrieve/>
7103                 <update permission="UPDATE_COPY">
7104                     <context link="call_number" field="owning_lib"/>
7105                 </update>
7106                 <delete permission="DELETE_COPY">
7107                     <context link="call_number" field="owning_lib"/>
7108                 </delete>
7109             </actions>
7110         </permacrud>
7111         </class>
7112
7113         <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">
7114                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7115                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7116                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7117                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7118                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7119                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7120                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7121                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7122                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7123                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7124                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7125                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7126                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7127                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7128                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7129                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7130                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7131                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7132                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7133                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7134                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7135                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7136                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7137                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7138                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7139                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7140                 </fields>
7141                 <links>
7142                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7143                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7144                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7145                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7146                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7147                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7148                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7149                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7150                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7151                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7152                 </links>
7153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7154                         <actions>
7155                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7156                                 <retrieve />
7157                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7158                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7159                         </actions>
7160                 </permacrud>
7161         </class>
7162
7163         <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">
7164                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7165                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7166                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7167                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7168                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7169                 </fields>
7170                 <links/>
7171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7172             <actions>
7173                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7174                 <retrieve/>
7175                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7176                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7177             </actions>
7178         </permacrud>
7179         </class>
7180         <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">
7181                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7182                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7183                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7184                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7185                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7186                 </fields>
7187                 <links/>
7188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7189             <actions>
7190                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7191                 <retrieve/>
7192                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7193                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7194             </actions>
7195         </permacrud>
7196         </class>
7197         <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">
7198                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7199                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7200                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7201                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7202                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7203                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7204                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7205                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7206                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7207                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7208                 </fields>
7209                 <links>
7210                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7211                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7212                 </links>
7213         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7214             <actions>
7215                 <create permission="CREATE_PERM" global_required="true"/>
7216                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7217                 <update permission="UPDATE_PERM" global_required="true"/>
7218                 <delete permission="DELETE_PERM" global_required="true"/>
7219             </actions>
7220         </permacrud>
7221         </class>
7222         <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">
7223                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7224                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7225                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7226                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7227                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7228                 </fields>
7229                 <links>
7230                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7231                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7232                 </links>
7233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7234             <actions>
7235                 <create permission="ADMIN_SURVEY">
7236                     <context link="question" jump="survey" field="owner"/>
7237                 </create>
7238                 <retrieve/>
7239                 <update permission="ADMIN_SURVEY">
7240                     <context link="question" jump="survey" field="owner"/>
7241                 </update>
7242                 <delete permission="ADMIN_SURVEY">
7243                     <context link="question" jump="survey" field="owner"/>
7244                 </delete>
7245             </actions>
7246         </permacrud>
7247         </class>
7248         <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">
7249                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7250                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7251                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7252                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7253                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7254                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7255                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7256                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7257                 </fields>
7258                 <links>
7259                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7260                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7261                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7262                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7263                 </links>
7264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7265                         <actions>
7266                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7267                         </actions>
7268                 </permacrud>
7269         </class>
7270         <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">
7271                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7272                         <field name="balance_owed" reporter:datatype="money" />
7273                         <field name="total_owed" reporter:datatype="money" />
7274                         <field name="total_paid" reporter:datatype="money" />
7275                         <field name="usr" reporter:datatype="link"/>
7276                 </fields>
7277                 <links>
7278                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7279                 </links>
7280         </class>
7281         <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">
7282                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7283                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7284                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7285                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7286                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7287                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7288                 </fields>
7289                 <links>
7290                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7291                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7292                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7293                 </links>
7294         </class>
7295         <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">
7296                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7297                         <field name="field" reporter:datatype="link"/>
7298                         <field name="id" reporter:datatype="id" />
7299                         <field name="source" reporter:datatype="link"/>
7300                         <field name="value" reporter:datatype="text"/>
7301                 </fields>
7302                 <links>
7303                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7304                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7305                 </links>
7306         </class>
7307         <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">
7308                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7309                         <field name="field" reporter:datatype="link"/>
7310                         <field name="id" reporter:datatype="id" />
7311                         <field name="source" reporter:datatype="link"/>
7312                         <field name="value" reporter:datatype="text"/>
7313                 </fields>
7314                 <links>
7315                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7316                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7317                 </links>
7318         </class>
7319         <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">
7320                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7321                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7322                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7323                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7324                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7325                 </fields>
7326                 <links>
7327                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7328                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7329                 </links>
7330         </class>
7331         <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">
7332                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7333                         <field name="depth" reporter:datatype="int" />
7334                         <field name="grantable" reporter:datatype="bool"/>
7335                         <field name="grp" reporter:datatype="link"/>
7336                         <field name="id" reporter:datatype="id" />
7337                         <field name="perm" reporter:datatype="link"/>
7338                 </fields>
7339                 <links>
7340                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7341                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7342                 </links>
7343         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7344             <actions>
7345                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7346                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7347                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7348                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7349             </actions>
7350         </permacrud>
7351         </class>
7352         <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">
7353                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7354                         <field name="items" oils_persist:virtual="true" />
7355                         <field name="btype" reporter:datatype="text"/>
7356                         <field name="id" reporter:datatype="id" />
7357                         <field name="name" reporter:datatype="text"/>
7358                         <field name="description" reporter:datatype="text"/>
7359                         <field name="owner" reporter:datatype="link"/>
7360                         <field name="pub" reporter:datatype="bool"/>
7361                         <field name="create_time" reporter:datatype="timestamp" />
7362                         <field name="owning_lib" reporter:datatype="org_unit" />
7363                 </fields>
7364                 <links>
7365                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7366                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7367                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7368                 </links>
7369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7370                         <actions>
7371                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7372                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7373                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7374                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7375                         </actions>
7376                 </permacrud>
7377         </class>
7378         <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">
7379                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7380                         <field name="id" reporter:datatype="id" />
7381                         <field name="bucket" reporter:datatype="link"/>
7382                         <field name="note" reporter:datatype="text" />
7383                 </fields>
7384                 <links>
7385                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7386                 </links>
7387         </class>
7388         <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">
7389                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7390                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7391                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7392                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7393                 </fields>
7394                 <links>
7395                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7396                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7397                 </links>
7398         </class>
7399         <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">
7400                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7401                         <field name="depth" reporter:datatype="int"/>
7402                         <field name="grantable" reporter:datatype="bool"/>
7403                         <field name="id" reporter:datatype="id" />
7404                         <field name="perm" reporter:datatype="link"/>
7405                         <field name="usr" reporter:datatype="link"/>
7406                 </fields>
7407                 <links>
7408                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7409                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7410                 </links>
7411         </class>
7412         <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">
7413                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7414                         <field name="object_id" reporter:datatype="text"/>
7415                         <field name="grantable" reporter:datatype="bool"/>
7416                         <field name="id" reporter:datatype="id" />
7417                         <field name="perm" reporter:datatype="link"/>
7418                         <field name="usr" reporter:datatype="link"/>
7419                         <field name="object_type" reporter:datatype="text"/>
7420                 </fields>
7421                 <links>
7422                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7423                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7424                 </links>
7425         </class>
7426         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7427                 <fields oils_persist:primary="id" oils_persist:sequence="">
7428                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7429                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7430                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7431                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7432                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7433                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7434                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7435                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7436                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7437                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7438                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7439                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7440                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7441                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7442                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7443                 </fields>
7444                 <links>
7445                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7446                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7447                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7448                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7449                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7450                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7451                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7452                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7453                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7454                 </links>
7455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7456             <actions>
7457                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7458                     <context link="xact" jump="usr" field="home_ou"/>
7459                 </retrieve>
7460                         </actions>
7461                 </permacrud>
7462         </class>
7463         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
7464                 <fields oils_persist:primary="id" oils_persist:sequence="">
7465                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7466                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7467                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7468                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7469                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7470                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7471                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7472                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7473                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7474                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7475                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7476                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7477                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7478                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7479                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7480                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7481                 </fields>
7482                 <links>
7483                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7484                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7485                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7486                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7487                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7488                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7489                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7490                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7491                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7492                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7493                 </links>
7494         </class>
7495         <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">
7496                 <fields oils_persist:primary="id" oils_persist:sequence="">
7497                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7498                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7499                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7500                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7501                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7502                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7503                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7504                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7505                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7506                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7507                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7508                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7509                 </fields>
7510                 <links>
7511                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7512                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7513                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7514                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7515                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7516                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7517                 </links>
7518         </class>
7519         <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">
7520                 <fields oils_persist:primary="id" oils_persist:sequence="">
7521                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7522                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7523                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7524                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7525                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7526                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7527                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7528                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7529                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7530                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7531                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7532                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7533                 </fields>
7534                 <links>
7535                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7536                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7537                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7538                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7539                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7540                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7541                 </links>
7542         </class>
7543         <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">
7544                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7545                         <field name="bucket" reporter:datatype="link"/>
7546                         <field name="id" reporter:datatype="id" />
7547                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7548                         <field name="create_time" reporter:datatype="timestamp" />
7549                         <field name="pos" reporter:datatype="int" />
7550                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7551                 </fields>
7552                 <links>
7553                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7554                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7555             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7556                 </links>
7557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7558                         <actions>
7559                                 <retrieve permission="ADMIN_COPY_BUCKET">
7560                     <context link="bucket" owning_lib="owning_lib"/>
7561                 </retrieve>
7562             </actions>
7563         </permacrud>
7564         </class>
7565         <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">
7566                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7567                         <field name="id" reporter:datatype="id" />
7568                         <field name="item" reporter:datatype="link"/>
7569                         <field name="note" reporter:datatype="text" />
7570                 </fields>
7571                 <links>
7572                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7573                 </links>
7574         </class>
7575         <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">
7576                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7577                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7578                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7579                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7580                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7581                 </fields>
7582                 <links>
7583                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7584                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7585                 </links>
7586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7587                         <actions>
7588                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7589                         </actions>
7590                 </permacrud>
7591         </class>
7592     <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">
7593         <fields oils_persist:primary="field">
7594             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7595             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7596             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7597         </fields>
7598         <links/>
7599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7600             <actions>
7601                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7602                 <retrieve />
7603                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7604                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7605             </actions>
7606         </permacrud>
7607     </class>
7608         <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">
7609                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7610                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7611                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7612                 </fields>
7613                 <links/>
7614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7615             <actions>
7616                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7617                 <retrieve/>
7618                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7619                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7620             </actions>
7621         </permacrud>
7622         </class>
7623
7624
7625         <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">
7626                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7627                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7628                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7629                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7630                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7631                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7632                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7633                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7634                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7635                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7636                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7637                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7638                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7639                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7640                 </fields>
7641                 <links>
7642                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7643                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7644                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7645                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7646                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7647                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7648                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7649                 </links>
7650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7651             <actions>
7652                 <create permission="TRANSIT_COPY">
7653                     <context link="target_copy" field="owner"/>
7654                 </create>
7655                 <retrieve/>
7656                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7657                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7658             </actions>
7659         </permacrud>
7660         </class>
7661         <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">
7662                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7663                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7664                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7665                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7666                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7667                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7668                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7669                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7670                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7671                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7672                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7673                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7674                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7675                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7676                 </fields>
7677                 <links>
7678                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7679                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7680                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7681                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7682                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7683                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7684                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7685                 </links>
7686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7687             <actions>
7688                 <create permission="TRANSIT_COPY" context_field="owner">
7689                     <context link="target_copy" field="circ_lib"/>
7690                 </create>
7691                 <retrieve/>
7692                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7693                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7694             </actions>
7695         </permacrud>
7696         </class>
7697         <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">
7698                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7699                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7700                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7701                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7702                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7703                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7704                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7705                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7706                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7707                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7708                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7709                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7710                 </fields>
7711                 <links>
7712                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7713                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7714                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7715                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7716                 </links>
7717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7718             <actions>
7719                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7720                     <context link="xact" jump="usr" field="home_ou"/>
7721                 </retrieve>
7722                         </actions>
7723                 </permacrud>
7724         </class>
7725         <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">
7726                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7727                         <field name="grp" />
7728                         <field name="id" reporter:datatype="id" />
7729                         <field name="usr" />
7730                 </fields>
7731                 <links>
7732                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7733                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7734                 </links>
7735         </class>
7736         <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">
7737                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7738                         <field name="id" reporter:datatype="id" />
7739                         <field name="fq_field" reporter:datatype="text"/>
7740                         <field name="identity_value" reporter:datatype="text"/>
7741                         <field name="translation" reporter:datatype="text"/>
7742                         <field name="string" reporter:datatype="text"/>
7743                 </fields>
7744                 <links>
7745                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7746                 </links>
7747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7748             <actions>
7749                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7750                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7751                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7752                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7753             </actions>
7754         </permacrud>
7755         </class>
7756         <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">
7757                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7758                         <field name="id" reporter:datatype="id" />
7759                         <field name="fm_class" reporter:datatype="text"/>
7760                         <field name="field" reporter:datatype="text"/>
7761                         <field name="owner" reporter:datatype="org_unit"/>
7762                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7763                 </fields>
7764                 <links>
7765                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7766                 </links>
7767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7768             <actions>
7769                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7770                 <retrieve/>
7771                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7772                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7773             </actions>
7774         </permacrud>
7775         </class>
7776         <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">
7777                 <fields oils_persist:primary="code">
7778                         <field name="code" reporter:datatype="id" />
7779                         <field name="marc_code" reporter:datatype="text"/>
7780                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7781                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7782                         <field name="rtl" reporter:datatype="bool"/>
7783                 </fields>
7784                 <links/>
7785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7786             <actions>
7787                 <create permission="CREATE_LOCALE" global_required="true"/>
7788                 <retrieve/>
7789                 <update permission="UPDATE_LOCALE" global_required="true"/>
7790                 <delete permission="DELETE_LOCALE" global_required="true"/>
7791             </actions>
7792         </permacrud>
7793         </class>
7794         <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">
7795                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7796                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7797                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7798                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7799             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7800                 </fields>
7801                 <links>
7802                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7803                 </links>
7804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7805             <actions>
7806                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7807                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7808                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7809                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7810             </actions>
7811         </permacrud>
7812         </class>
7813
7814         <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">
7815                 <fields oils_persist:primary="id">
7816                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7817                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7818                 </fields>
7819                 <links/>
7820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7821             <actions>
7822                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7823                 <retrieve/>
7824                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7825                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7826             </actions>
7827         </permacrud>
7828         </class>
7829
7830         <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">
7831                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7832                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7833                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7834                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7835                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7836                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7837                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7838                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7839                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7840                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7841                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7842                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7843                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7844                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7845                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7846                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7847                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7848                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7849                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7850                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7851                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7852                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7853                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7854                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7855                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7856                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7857                 </fields>
7858                 <links>
7859                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7860                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7861                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7862                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7863                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7864                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7865                 </links>
7866         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7867             <actions>
7868                 <create permission="user_request.create">
7869                     <context link="usr" field="home_ou"/>
7870                                 </create>
7871                 <retrieve permission="user_request.view">
7872                     <context link="usr" field="home_ou"/>
7873                                 </retrieve>
7874                 <update permission="user_request.update">
7875                     <context link="usr" field="home_ou"/>
7876                                 </update>
7877                 <delete permission="user_request.delete">
7878                     <context link="usr" field="home_ou"/>
7879                                 </delete>
7880             </actions>
7881         </permacrud>
7882         </class>
7883
7884         <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">
7885                 <fields oils_persist:primary="code">
7886                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7887                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7888                 </fields>
7889                 <links/>
7890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7891             <actions>
7892                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7893                 <retrieve/>
7894                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7895                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7896             </actions>
7897         </permacrud>
7898         </class>
7899
7900         <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">
7901                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7902                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7903                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7904                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7905                         <field reporter:label="Ratio" name="ratio" />
7906                 </fields>
7907                 <links>
7908                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7909                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7910                 </links>
7911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7912                         <actions>
7913                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7914                                 <retrieve/>
7915                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7916                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7917                         </actions>
7918                 </permacrud>
7919         </class>
7920
7921         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7923                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7924                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7925                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7926                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7927                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7928                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7929                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7930                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7931                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7932                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7933                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7934                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7935                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7936                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7937                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7938                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7939                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7940                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
7941                 </fields>
7942                 <links>
7943                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7944                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7945             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7946             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7947                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7948                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
7949                 </links>
7950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7951             <actions>
7952                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7953                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7954                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7955                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7956             </actions>
7957         </permacrud>
7958         </class>
7959
7960         <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">
7961                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7962                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7963                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7964                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7965                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7966                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7967                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7968                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7969                 </fields>
7970                 <links>
7971                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7972                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7973                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7974                 </links>
7975         </class>
7976
7977         <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">
7978                 <fields oils_persist:primary="code">
7979                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7980                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7981                 </fields>
7982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7983             <actions>
7984                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7985                 <retrieve/>
7986                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7987                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7988             </actions>
7989                 </permacrud>
7990         </class>
7991
7992         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7993                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7994                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7995                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7996                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7997                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7998                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7999                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8000                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8001                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8002                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8003                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8004                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8005                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8006                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8007                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8008                 </fields>
8009                 <links>
8010                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8011                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8012                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8013                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8014                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8015                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8016                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8017                 </links>
8018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8019             <actions>
8020                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8021                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8022                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8023                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8024             </actions>
8025         </permacrud>
8026         </class>
8027
8028         <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">
8029                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8030                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8031                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8032                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8033                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8034                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8035                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8036                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8037                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8038                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8039                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8040                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8041                 </fields>
8042                 <links>
8043                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8044                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8045                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8046                 </links>
8047         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8048             <actions>
8049                 <create   permission="ADMIN_INVOICE">
8050                                         <context link="invoice" field="receiver"/>
8051                                 </create>
8052                 <retrieve permission="ADMIN_INVOICE">
8053                                         <context link="invoice" field="receiver"/>
8054                                 </retrieve>
8055                 <update   permission="ADMIN_INVOICE">
8056                                         <context link="invoice" field="receiver"/>
8057                                 </update>
8058                                 <delete   permission="ADMIN_INVOICE">
8059                                         <context link="invoice" field="receiver"/>
8060                                 </delete>
8061             </actions>
8062         </permacrud>
8063         </class>
8064
8065         <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">
8066                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8067                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8068                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8069                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8070                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8071                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8072                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8073                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8074                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8075                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8076                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8077                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8078                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8079                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8080                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8081                 </fields>
8082                 <links>
8083                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8084                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8085                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8086                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8087                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8088                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8089                 </links>
8090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8091             <actions>
8092                 <create   permission="ADMIN_INVOICE">
8093                                         <context link="invoice" field="receiver"/>
8094                                 </create>
8095                 <retrieve permission="ADMIN_INVOICE">
8096                                         <context link="invoice" field="receiver"/>
8097                                 </retrieve>
8098                 <update   permission="ADMIN_INVOICE">
8099                                         <context link="invoice" field="receiver"/>
8100                                 </update>
8101                                 <delete   permission="ADMIN_INVOICE">
8102                                         <context link="invoice" field="receiver"/>
8103                                 </delete>
8104             </actions>
8105         </permacrud>
8106         </class>
8107
8108         <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">
8109                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8110                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8111                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8112                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8113                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8114                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8115                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8116                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8117                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8118                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8119                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8120                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8121                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8122                 </fields>
8123                 <links>
8124                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8125                 </links>
8126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8127             <actions>
8128                 <create permission="ADMIN_PROVIDER">
8129                     <context link="provider" field="owner"/>
8130                 </create>
8131                 <retrieve permission="ADMIN_PROVIDER">
8132                     <context link="provider" field="owner"/>
8133                 </retrieve>
8134                 <update permission="ADMIN_PROVIDER">
8135                     <context link="provider" field="owner"/>
8136                 </update>
8137                 <delete permission="ADMIN_PROVIDER">
8138                     <context link="provider" field="owner"/>
8139                 </delete>
8140             </actions>
8141         </permacrud>
8142         </class>
8143
8144         <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">
8145                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8146                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8147                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8148                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8149                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8150                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8151                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8152         </fields>
8153                 <links>
8154                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8155                 </links>
8156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8157             <actions>
8158                 <create permission="ADMIN_PROVIDER">
8159                     <context link="provider" field="owner"/>
8160                 </create>
8161                 <retrieve permission="ADMIN_PROVIDER">
8162                     <context link="provider" field="owner"/>
8163                 </retrieve>
8164                 <update permission="ADMIN_PROVIDER">
8165                     <context link="provider" field="owner"/>
8166                 </update>
8167                 <delete permission="ADMIN_PROVIDER">
8168                     <context link="provider" field="owner"/>
8169                 </delete>
8170             </actions>
8171         </permacrud>
8172     </class>
8173         <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">
8174                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8175                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8176                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8177                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8178                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8179                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8180                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8181                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8182                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8183                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8184                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8185                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8186                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8187                 </fields>
8188                 <links>
8189                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8190                 </links>
8191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8192             <actions>
8193                 <create permission="ADMIN_PROVIDER">
8194                     <context link="contact" jump='provider' field="owner"/>
8195                 </create>
8196                 <retrieve permission="ADMIN_PROVIDER">
8197                     <context link="contact" jump='provider' field="owner"/>
8198                 </retrieve>
8199                 <update permission="ADMIN_PROVIDER">
8200                     <context link="contact" jump='provider' field="owner"/>
8201                 </update>
8202                 <delete permission="ADMIN_PROVIDER">
8203                     <context link="contact" jump='provider' field="owner"/>
8204                 </delete>
8205             </actions>
8206         </permacrud>
8207         </class>
8208
8209         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8211                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8212                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8213                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8214                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8215                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8216                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8217                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8218                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8219                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8220                 </fields>
8221                 <links>
8222                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8223                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8224                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8225                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8226                 </links>
8227         </class>
8228
8229         <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">
8230                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8231                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8232                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8233                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8234                 </fields>
8235                 <links>
8236             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8237                 </links>
8238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8239                         <actions>
8240                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8241                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8242                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8243                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8244                         </actions>
8245                 </permacrud>
8246         </class>
8247
8248         <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">
8249                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8250                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8251                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8252                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8253                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8254                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8255                 </fields>
8256                 <links>
8257                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8258                 </links>
8259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8260                         <actions>
8261                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8262                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8263                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8264                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8265                         </actions>
8266                 </permacrud>
8267         </class>
8268
8269         <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">
8270                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8271                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8272                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8273                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8274                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8275                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8276                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8277                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8278                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8279                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8280                 </fields>
8281                 <links>
8282                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8283                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8284             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8285             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8286                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8287                 </links>
8288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8289             <actions>
8290                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8291                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8292                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8293                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8294             </actions>
8295         </permacrud>
8296         </class>
8297
8298         <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">
8299                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8300                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8301                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8302                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8303                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8304                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8305                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8306                 </fields>
8307                 <links>
8308                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8309                 </links>
8310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8311                         <actions>
8312                                 <create permission="ADMIN_FUNDING_SOURCE">
8313                     <context link="funding_source" field="owner"/>
8314                 </create>
8315                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8316                     <context link="funding_source" field="owner"/>
8317                 </retrieve>
8318                                 <update permission="ADMIN_FUNDING_SOURCE">
8319                     <context link="funding_source" field="owner"/>
8320                 </update>
8321                                 <delete permission="ADMIN_FUNDING_SOURCE">
8322                     <context link="funding_source" field="owner"/>
8323                 </delete>
8324                         </actions>
8325                 </permacrud>
8326         </class>
8327
8328         <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">
8329                 <fields oils_persist:primary="id">
8330                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8331                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8332                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8333                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8334                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8335                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8336                 </fields>
8337                 <links>
8338                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8339                 </links>
8340         </class>
8341
8342         <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">
8343                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8344                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8345                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8346                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8347                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8348                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8349                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8350                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8351                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8352                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8353                 </fields>
8354                 <links>
8355                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8356                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8357                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8358                 </links>
8359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8360                         <actions>
8361                                 <create permission="ADMIN_ACQ_FUND">
8362                     <context link="fund" field="org"/>
8363                 </create>
8364                                 <retrieve permission="ADMIN_ACQ_FUND">
8365                     <context link="fund" field="org"/>
8366                 </retrieve>
8367                                 <update permission="ADMIN_ACQ_FUND">
8368                     <context link="fund" field="org"/>
8369                 </update>
8370                                 <delete permission="ADMIN_ACQ_FUND">
8371                     <context link="fund" field="org"/>
8372                 </delete>
8373                         </actions>
8374                 </permacrud>
8375         </class>
8376
8377         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8378                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8379                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8380                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8381                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8382                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8383                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8384                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8385                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8386                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8387                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8388                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8389                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8390                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8391                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8392                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8393                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8394                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8395                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8396                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8397                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8398                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8399                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8400                 </fields>
8401                 <links>
8402                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8403                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8404             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8405             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8406             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8407             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8408             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8409             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8410             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8411             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8412             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8413                 </links>
8414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8415             <actions>
8416                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8417                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8418                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8419                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8420             </actions>
8421         </permacrud>
8422         </class>
8423
8424         <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">
8425                 <fields oils_persist:primary="fund">
8426                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8427                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8428                 </fields>
8429                 <links>
8430                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8431                 </links>
8432         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8433             <actions>
8434                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8435                                         <context link="fund" field="org" />
8436                 </retrieve>
8437             </actions>
8438         </permacrud>
8439         </class>
8440
8441         <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">
8442                 <fields oils_persist:primary="fund">
8443                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8444                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8445                 </fields>
8446                 <links>
8447                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8448                 </links>
8449         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8450             <actions>
8451                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8452                                         <context link="fund" field="org" />
8453                 </retrieve>
8454             </actions>
8455         </permacrud>
8456         </class>
8457
8458         <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">
8459                 <fields oils_persist:primary="fund">
8460                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8461                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8462                 </fields>
8463                 <links>
8464                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8465                 </links>
8466         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8467             <actions>
8468                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8469                                         <context link="fund" field="org" />
8470                 </retrieve>
8471             </actions>
8472         </permacrud>
8473         </class>
8474
8475         <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">
8476                 <fields oils_persist:primary="fund">
8477                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8478                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8479                 </fields>
8480                 <links>
8481                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8482                 </links>
8483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8484             <actions>
8485                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8486                                         <context link="fund" field="org" />
8487                 </retrieve>
8488             </actions>
8489         </permacrud>
8490         </class>
8491
8492         <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">
8493                 <fields oils_persist:primary="fund">
8494                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8495                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8496                 </fields>
8497                 <links>
8498                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8499                 </links>
8500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8501             <actions>
8502                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8503                                         <context link="fund" field="org" />
8504                 </retrieve>
8505             </actions>
8506         </permacrud>
8507         </class>
8508
8509    <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">
8510         <fields oils_persist:primary="fund">
8511             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8512             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8513         </fields>
8514         <links>
8515             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8516         </links>
8517     </class>
8518
8519    <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">
8520         <fields oils_persist:primary="fund">
8521             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8522             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8523         </fields>
8524         <links>
8525             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8526         </links>
8527     </class>
8528
8529    <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">
8530         <fields oils_persist:primary="fund">
8531             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8532             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8533         </fields>
8534         <links>
8535             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8536         </links>
8537     </class>
8538
8539    <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">
8540         <fields oils_persist:primary="fund">
8541             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8542             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8543         </fields>
8544         <links>
8545             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8546         </links>
8547     </class>
8548
8549    <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">
8550         <fields oils_persist:primary="fund">
8551             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8552             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8553         </fields>
8554         <links>
8555             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8556         </links>
8557     </class>
8558
8559         <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">
8560                 <fields oils_persist:primary="funding_source">
8561                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8562                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8563                 </fields>
8564                 <links>
8565                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8566                 </links>
8567         </class>
8568
8569         <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">
8570                 <fields oils_persist:primary="funding_source">
8571                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8572                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8573                 </fields>
8574                 <links>
8575                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8576                 </links>
8577         </class>
8578
8579         <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">
8580                 <fields oils_persist:primary="funding_source">
8581                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8582                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8583                 </fields>
8584                 <links>
8585                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8586                 </links>
8587         </class>
8588
8589         <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">
8590                 <fields oils_persist:primary="fund">
8591                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8592                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8593                 </fields>
8594                 <links>
8595                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8596                 </links>
8597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8598             <actions>
8599                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8600                                         <context link="fund" field="org" />
8601                 </retrieve>
8602             </actions>
8603         </permacrud>
8604     </class>
8605     <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">
8606         <oils_persist:source_definition><![CDATA[
8607             SELECT
8608                 acqf.*,
8609                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8610                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8611                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8612                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8613             FROM
8614                 acq.fund acqf
8615                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8616                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8617                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8618                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8619         ]]></oils_persist:source_definition>
8620         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8621             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8622             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8623             <field reporter:label="Name" name="name" reporter:datatype="text" />
8624             <field reporter:label="Year" name="year" reporter:datatype="int" />
8625             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8626             <field reporter:label="Code" name="code" reporter:datatype="text" />
8627             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8628             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8629             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8630             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8631             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8632
8633             <!-- non fund-native fields -->
8634             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8635             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8636             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8637             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8638         </fields>
8639         <links>
8640             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8641             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8642             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8643         </links>
8644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8645             <actions>
8646                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8647             </actions>
8648         </permacrud>
8649         </class>
8650         <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">
8651                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8652                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8653                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8654                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8655                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8656                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8657                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8658                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8659                 </fields>
8660                 <links>
8661                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8662                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8663                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8664                 </links>
8665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8666                         <actions>
8667                                 <create permission="ADMIN_ACQ_FUND">
8668                     <context link="fund" field="org"/>
8669                 </create>
8670                                 <retrieve permission="ADMIN_ACQ_FUND">
8671                     <context link="fund" field="org"/>
8672                 </retrieve>
8673                                 <update permission="ADMIN_ACQ_FUND">
8674                     <context link="fund" field="org"/>
8675                 </update>
8676                                 <delete permission="ADMIN_ACQ_FUND">
8677                     <context link="fund" field="org"/>
8678                 </delete>
8679                         </actions>
8680                 </permacrud>
8681         </class>
8682
8683     <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">
8684         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8685             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8686             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8687             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8688             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8689             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8690             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8691             <field reporter:label="Note" name="note" reporter:datatype="text" />
8692             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8693         </fields>
8694         <links>
8695             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8696             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8697             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8698         </links>
8699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8700                         <actions>
8701                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8702                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8703                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8704                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8705                         </actions>
8706                 </permacrud>
8707     </class>
8708
8709         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8710                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8711                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8712                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8713                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8714                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8715                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8716                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8717                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8718                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8719                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8720                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8721                 </fields>
8722                 <links>
8723                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8724                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8725                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8726                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8727                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8728                 </links>
8729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8730                         <actions>
8731                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8732                         </actions>
8733                 </permacrud>
8734         </class>
8735
8736         <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">
8737                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8738                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8739                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8740                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8741                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8742                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8743                 </fields>
8744                 <links>
8745                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8746                 </links>
8747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8748                         <actions>
8749                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8750                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8751                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8752                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8753                         </actions>
8754                 </permacrud>
8755         </class>
8756
8757         <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">
8758                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8759                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8760                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8761                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8762                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8763                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8764                         <field reporter:label="State" name="state" reporter:datatype="text" />
8765                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8766                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8767                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8768                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8769                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8770                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8771                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8772                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8773                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8774                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8775                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8776                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8777                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8778                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8779                 </fields>
8780                 <links>
8781                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8782                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8783                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8784                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8785                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8786                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8787                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8788                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8789                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8790                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8791                 </links>
8792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8793                         <actions>
8794                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8795                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8796                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8797                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8798                         </actions>
8799                 </permacrud>
8800         </class>
8801
8802         <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">
8803                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8804                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8805                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8806                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8807                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8808                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8809                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8810                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8811                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8812                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8813                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8814                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8815                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8816                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8818                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8819                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8820                 </fields>
8821                 <links>
8822                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8823                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8824                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8825                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8826                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8827                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8828                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8829                 </links>
8830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8831             <actions>
8832                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8833             </actions>
8834                 </permacrud>
8835         </class>
8836
8837         <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">
8838                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8839                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8840                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8841                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8842                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8843                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8844                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8845                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8846                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8847                 </fields>
8848                 <links>
8849                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8850                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8851                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8852                 </links>
8853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8854             <actions>
8855                 <create permission="CREATE_PURCHASE_ORDER">
8856                     <context link="purchase_order" field="ordering_agency"/>
8857                 </create>
8858                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8859                     <context link="purchase_order" field="ordering_agency"/>
8860                 </retrieve>
8861                 <update permission="CREATE_PURCHASE_ORDER">
8862                     <context link="purchase_order" field="ordering_agency"/>
8863                 </update>
8864                 <delete permission="CREATE_PURCHASE_ORDER">
8865                     <context link="purchase_order" field="ordering_agency"/>
8866                 </delete>
8867             </actions>
8868                 </permacrud>
8869         </class>
8870
8871         <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">
8872                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8873                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8874                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8875                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8876                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8877                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8878                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8879                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8880                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8881                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8882                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8883                 </fields>
8884                 <links>
8885                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8886                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8887                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8888                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8889                 </links>
8890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8891             <actions>
8892                 <create permission="CREATE_PURCHASE_ORDER">
8893                     <context link="purchase_order" field="ordering_agency"/>
8894                 </create>
8895                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8896                     <context link="purchase_order" field="ordering_agency"/>
8897                 </retrieve>
8898                 <update permission="CREATE_PURCHASE_ORDER">
8899                     <context link="purchase_order" field="ordering_agency"/>
8900                 </update>
8901                 <delete permission="CREATE_PURCHASE_ORDER">
8902                     <context link="purchase_order" field="ordering_agency"/>
8903                 </delete>
8904             </actions>
8905                 </permacrud>
8906         </class>
8907
8908         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8909                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8910                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8911                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8912                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8913                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8914                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8915                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8916                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8917                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8918                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8919                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8920                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8921                         <field reporter:label="State" name="state" reporter:datatype="text" />
8922                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8923                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8924                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8925                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8926                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8927                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8928                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8929                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8930                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8931                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8932                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8933                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8934                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8935                 </fields>
8936                 <links>
8937                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8938                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8939                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8940                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8941                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8942                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8943                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8944                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8945                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8946                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8947                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8948                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8949                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8950                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8951                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8952                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8953                 </links>
8954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8955                         <actions>
8956                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8957                                         <context link="purchase_order" field="ordering_agency"/>
8958                                         <context link="picklist" field="org_unit"/>
8959                                 </retrieve>
8960                         </actions>
8961                 </permacrud>
8962         </class>
8963
8964         <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">
8965                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8966                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8967                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8968                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8969                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8970                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8971                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8972                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8973                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8974                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8975                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8976                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8977                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8978                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8979                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8980                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8981                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8982                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8983                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8984                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8985                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8986                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8987                 </fields>
8988                 <links>
8989                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8990                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8991                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8992                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8993                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8994                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8995                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8996                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8997                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8998                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8999                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9000                 </links>
9001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9002                         <actions>
9003                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9004                                         <context link="purchase_order" field="ordering_agency"/>
9005                                         <context link="picklist" field="org_unit"/>
9006                                 </retrieve>
9007                         </actions>
9008                 </permacrud>
9009         </class>
9010
9011         <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">
9012                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9013                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9014                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9015                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9016                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9017                 </fields>
9018                 <links>
9019                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9020                 </links>
9021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9022                         <actions>
9023                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9024                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9025                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9026                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9027                         </actions>
9028                 </permacrud>
9029         </class>
9030
9031         <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">
9032                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9033                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9034                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9035                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9036                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9037                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9038                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9039                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9040                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9041                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9042                 </fields>
9043                 <links>
9044                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9045                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9046                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9047                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9048                 </links>
9049         </class>
9050
9051         <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">
9052                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9053                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9054                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9055                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9056                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9057                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9058                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9059                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9060                 </fields>
9061                 <links>
9062                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9063                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9064                 </links>
9065         </class>
9066
9067         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
9068                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9069                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9070                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9071                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9072                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9073                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9074                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9075                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9076                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9077                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9078                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9079                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9080                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9081                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9082                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9083                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9084                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9085                 </fields>
9086                 <links>
9087                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9088                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9089                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9090                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9091                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9092                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9093                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9094                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9095                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9096                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9097                 </links>
9098         </class>
9099
9100         <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">
9101                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9102                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9103                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9104                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9105                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9106                 </fields>
9107                 <links/>
9108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9109                         <actions>
9110                                 <retrieve />
9111                         </actions>
9112                 </permacrud>
9113         </class>
9114
9115         <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">
9116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9117                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9118                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9119                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9120                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9121                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9122             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9123                 </fields>
9124                 <links/>
9125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9126             <actions>
9127                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9128                 <retrieve />
9129                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9130                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9131             </actions>
9132         </permacrud>
9133         </class>
9134
9135         <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">
9136                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9137                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9138                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9139                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9140                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9141                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9142                 </fields>
9143                 <links/>
9144         </class>
9145         <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">
9146                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9147                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9148                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9149                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9150                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9151                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9152                 </fields>
9153                 <links>
9154                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9155                 </links>
9156         </class>
9157
9158         <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">
9159             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9160                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9161                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9162                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9163                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9164                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9165                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9166         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9167
9168             </fields>
9169             <links>
9170                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9171             </links>
9172             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9173                 <actions>
9174                     <create permission="ADMIN_PROVIDER">
9175                         <context link="provider" field="owner"/>
9176                     </create>
9177                     <retrieve permission="ADMIN_PROVIDER">
9178                         <context link="provider" field="owner"/>
9179                     </retrieve>
9180                     <update permission="ADMIN_PROVIDER">
9181                         <context link="provider" field="owner"/>
9182                     </update>
9183                     <delete permission="ADMIN_PROVIDER">
9184                         <context link="provider" field="owner"/>
9185                     </delete>
9186                 </actions>
9187             </permacrud>
9188         </class>
9189         
9190         <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">
9191             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9192                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9193                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9194                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9195                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9196             </fields>
9197             <links>
9198                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9199             </links>
9200             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9201                 <actions>
9202                     <create permission="ADMIN_PROVIDER">
9203                         <context link="provider" field="owner"/>
9204                     </create>
9205                     <retrieve permission="ADMIN_PROVIDER">
9206                         <context link="provider" field="owner"/>
9207                     </retrieve>
9208                     <update permission="ADMIN_PROVIDER">
9209                         <context link="provider" field="owner"/>
9210                     </update>
9211                     <delete permission="ADMIN_PROVIDER">
9212                         <context link="provider" field="owner"/>
9213                     </delete>
9214                 </actions>
9215             </permacrud>
9216         </class>
9217         
9218         <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">
9219             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9220                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9221                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9222                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9223                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9224                 </fields>
9225                 <links/>
9226         </class>
9227
9228         <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">
9229                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9230                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9231                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9232                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9233                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9234                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9235                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9236                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9237                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9238                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9239                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9240                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9241                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9242                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9243                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9244                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9245                 </fields>
9246                 <links>
9247                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9248                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9249                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9250                 </links>
9251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9252             <actions>
9253                 <create permission="ADMIN_PROVIDER">
9254                     <context link="provider" field="owner"/>
9255                 </create>
9256                 <retrieve permission="ADMIN_PROVIDER">
9257                     <context link="provider" field="owner"/>
9258                 </retrieve>
9259                 <update permission="ADMIN_PROVIDER">
9260                     <context link="provider" field="owner"/>
9261                 </update>
9262                 <delete permission="ADMIN_PROVIDER">
9263                     <context link="provider" field="owner"/>
9264                 </delete>
9265             </actions>
9266         </permacrud>
9267         </class>
9268
9269         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9270                 oils_obj:fieldmapper="acq::edi_attr" 
9271                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9272                 <fields oils_persist:primary="key">
9273                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9274                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9275                 </fields>
9276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9277             <actions>
9278                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9279                 <retrieve/>
9280                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9281                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9282             </actions>
9283         </permacrud>
9284         </class>
9285         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9286                 oils_obj:fieldmapper="acq::edi_attr_set" 
9287                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9288                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9289                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9290                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9291                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9292                 </fields>
9293                 <links>
9294                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9295                 </links>
9296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9297             <actions>
9298                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9299                 <retrieve/>
9300                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9301                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9302             </actions>
9303         </permacrud>
9304         </class>
9305         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9306                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9307                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9308                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9309                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9310                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9311                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9312                 </fields>
9313                 <links>
9314                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9315                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9316                 </links>
9317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9318             <actions>
9319                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9320                 <retrieve/>
9321                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9322                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9323             </actions>
9324         </permacrud>
9325         </class>
9326
9327
9328         <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">
9329                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9330                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9331                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9332                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9333                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9334                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9335                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9336                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9337                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9338                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9339                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9340                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9341                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9342                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9343                 </fields>
9344                 <links>
9345                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9346                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9347                 </links>
9348         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9349             <actions>
9350                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9351                     <context link="account" jump="provider" field="owner"/>
9352                 </retrieve>
9353                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9354                     <context link="account" jump="provider" field="owner"/>
9355                 </update>
9356                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9357                     <context link="account" jump="provider" field="owner"/>
9358                 </delete>
9359             </actions>
9360         </permacrud>
9361         </class>
9362
9363
9364         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9365                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9366                         <field name="id" reporter:datatype="id" />
9367                         <field name="parent" reporter:datatype="link"/>
9368                         <field name="owner" reporter:datatype="link"/>
9369                         <field name="create_time" reporter:datatype="timestamp"/>
9370                         <field name="name" reporter:datatype="text"/>
9371                         <field name="shared" reporter:datatype="bool"/>
9372                         <field name="share_with" reporter:datatype="link"/>
9373                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9374                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9375                 </fields>
9376                 <links>
9377                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9378                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9379                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9380                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9381                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9382                 </links>
9383         </class>
9384         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9385                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9386                         <field name="id" reporter:datatype="id" />
9387                         <field name="parent" reporter:datatype="link"/>
9388                         <field name="owner" reporter:datatype="link"/>
9389                         <field name="create_time" reporter:datatype="timestamp"/>
9390                         <field name="name" reporter:datatype="text"/>
9391                         <field name="shared" reporter:datatype="bool"/>
9392                         <field name="share_with" reporter:datatype="link"/>
9393                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9394                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9395                 </fields>
9396                 <links>
9397                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9398                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9399                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9400                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9401                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9402                 </links>
9403         </class>
9404         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9405                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9406                         <field name="id" reporter:datatype="id" />
9407                         <field name="parent" reporter:datatype="link"/>
9408                         <field name="owner" reporter:datatype="link"/>
9409                         <field name="create_time" reporter:datatype="timestamp"/>
9410                         <field name="name" reporter:datatype="text"/>
9411                         <field name="shared" reporter:datatype="bool"/>
9412                         <field name="share_with" reporter:datatype="link"/>
9413                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9414                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9415                 </fields>
9416                 <links>
9417                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9418                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9419                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9420                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9421                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9422                 </links>
9423         </class>
9424         <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">
9425                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9426                         <field name="id" reporter:datatype="id" />
9427                         <field name="owner" reporter:datatype="link"/>
9428                         <field name="create_time" reporter:datatype="timestamp"/>
9429                         <field name="name" reporter:datatype="text"/>
9430                         <field name="data" reporter:datatype="text"/>
9431                         <field name="folder" reporter:datatype="link"/>
9432                         <field name="description" reporter:datatype="text"/>
9433                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9434                 </fields>
9435                 <links>
9436                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9437                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9438                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9439                 </links>
9440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9441             <actions>
9442                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9443                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9444                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9445                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9446             </actions>
9447         </permacrud>
9448         </class>
9449         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9450                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9451                         <field name="id" reporter:datatype="id" />
9452                         <field name="owner" reporter:datatype="link"/>
9453                         <field name="create_time" reporter:datatype="timestamp"/>
9454                         <field name="template" reporter:datatype="link"/>
9455                         <field name="data" reporter:datatype="text"/>
9456                         <field name="folder" reporter:datatype="link"/>
9457                         <field name="recur" reporter:datatype="bool"/>
9458                         <field name="recurrence" reporter:datatype="interval"/>
9459                         <field name="name" reporter:datatype="text"/>
9460                         <field name="description" reporter:datatype="text"/>
9461                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9462                 </fields>
9463                 <links>
9464                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9465                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9466                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9467                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9468                 </links>
9469         </class>
9470         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9471                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9472                         <field name="id" reporter:datatype="id" />
9473                         <field name="runner" reporter:datatype="link"/>
9474                         <field name="start_time" reporter:datatype="timestamp"/>
9475                         <field name="complete_time" reporter:datatype="timestamp"/>
9476                         <field name="run_time" reporter:datatype="timestamp"/>
9477                         <field name="email" reporter:datatype="text"/>
9478                         <field name="excel_format" reporter:datatype="bool"/>
9479                         <field name="csv_format" reporter:datatype="bool"/>
9480                         <field name="html_format" reporter:datatype="bool"/>
9481                         <field name="error_code" reporter:datatype="int"/>
9482                         <field name="error_text" reporter:datatype="text"/>
9483                         <field name="report" reporter:datatype="link"/>
9484                         <field name="folder" reporter:datatype="link"/>
9485                         <field name="chart_pie" reporter:datatype="bool"/>
9486                         <field name="chart_bar" reporter:datatype="bool"/>
9487                         <field name="chart_line" reporter:datatype="bool"/>
9488                 </fields>
9489                 <links>
9490                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9491                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9492                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9493                 </links>
9494         </class>
9495         <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">
9496                 <fields oils_persist:primary="id">
9497                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9498                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9499                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9500                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9501                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9502                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9503                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9504                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9505                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9506                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9507                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9508                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9509                 </fields>
9510                 <links>
9511                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9512                 </links>
9513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9514                         <actions>
9515                                 <retrieve />
9516                         </actions>
9517                 </permacrud>
9518         </class>
9519         <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">
9520                 <fields oils_persist:primary="id">
9521                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9522                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9523                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9524                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9525                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9526                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9527                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9528                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9529                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9530                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9531                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9532                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9533                 </fields>
9534                 <links>
9535                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9536                 </links>
9537         </class>
9538         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9539                 <fields oils_persist:primary="id">
9540                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9541                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9542                         <field reporter:label="Fingerprint" name="fingerprint" />
9543                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9544                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9545                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9546                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9547                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9548                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9549                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9550                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9551                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9552                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9553                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9554                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9555                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9556                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9557                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9558                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9559                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9560                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9561                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9562                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9563                 </fields>
9564                 <links>
9565                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9566                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9567                 </links>
9568         </class>
9569         <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">
9570                 <fields oils_persist:primary="id">
9571                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9572                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9573                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9574                 </fields>
9575                 <links>
9576                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9577                 </links>
9578         </class>
9579         <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">
9580                 <fields oils_persist:primary="id">
9581                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9582                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9583                 </fields>
9584                 <links>
9585                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9586                 </links>
9587         </class>
9588         <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">
9589                 <fields oils_persist:primary="id">
9590                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9591                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9592                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9593                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9594                 </fields>
9595                 <links>
9596                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9597                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9598                 </links>
9599         </class>
9600         <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">
9601                 <fields oils_persist:primary="xact">
9602                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9603                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9604                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9605                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9606                 </fields>
9607                 <links>
9608                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9609                 </links>
9610         </class>
9611         <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">
9612                 <fields oils_persist:primary="xact">
9613                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9614                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9615                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9616                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9617                 </fields>
9618                 <links>
9619                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9620                 </links>
9621         </class>
9622         <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)">
9623                 <fields oils_persist:primary="id">
9624                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9625                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9626                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9627                 </fields>
9628                 <links>
9629                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9630                 </links>
9631         </class>
9632         <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
9633                 <fields oils_persist:primary="id">
9634                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9635                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9636                 </fields>
9637                 <links>
9638                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9639                 </links>
9640         </class>
9641         <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">
9642                 <fields oils_persist:primary="bibid">
9643                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
9644                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
9645                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
9646                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
9647                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
9648                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
9649                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
9650                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
9651                 </fields>
9652                 <links>
9653                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
9654                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9655                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9656                 </links>
9657         </class>
9658         <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">
9659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9660                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9661                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9662                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9663                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9664                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9665                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9666                 </fields>
9667                 <links>
9668                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9669                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9670                 </links>
9671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9672                         <actions>
9673                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9674                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9675                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9676                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9677                         </actions>
9678                 </permacrud>
9679         </class>
9680         <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">
9681                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9682                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9683                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9684                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9685                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9686                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9687                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9688                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9689                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9690                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9691                 </fields>
9692                 <links>
9693                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9694                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9695                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9696                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9697                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9698                 </links>
9699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9700                         <actions>
9701                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9702                                         <context link="formula" field="owner"/>
9703                                 </create>
9704                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9705                                         <context link="formula" field="owner"/>
9706                                 </retrieve>
9707                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9708                                         <context link="formula" field="owner"/>
9709                                 </update>
9710                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9711                                         <context link="formula" field="owner"/>
9712                                 </delete>
9713                         </actions>
9714                 </permacrud>
9715         </class>
9716
9717         <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">
9718                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9719                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9720                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9721                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9722                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9723                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9724                 </fields>
9725                 <links>
9726                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9727                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9728                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9729                 </links>
9730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9731                         <actions>
9732                                 <create permission="CREATE_PURCHASE_ORDER">
9733                                         <context link="formula" field="owner"/>
9734                 </create>
9735                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9736                                         <context link="formula" field="owner"/>
9737                 </retrieve>
9738                                 <update permission="CREATE_PURCHASE_ORDER">
9739                                         <context link="formula" field="owner"/>
9740                 </update>
9741                                 <delete permission="CREATE_PURCHASE_ORDER">
9742                                         <context link="formula" field="owner"/>
9743                 </delete>
9744                         </actions>
9745                 </permacrud>
9746         </class>
9747
9748         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9749                 <fields oils_persist:primary="id">
9750                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9751                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9752                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9753                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9754                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9755                 </fields>
9756                 <links>
9757                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9758                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9759                 </links>
9760         </class>
9761
9762         <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">
9763                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9764                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9765                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9766                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9767                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9768                 </fields>
9769                 <links>
9770                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9771                 </links>
9772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9773                         <actions>
9774                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9775                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9776                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9777                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9778                         </actions>
9779                 </permacrud>
9780         </class>
9781
9782         <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">
9783                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9784                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9785                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9786                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9787                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9788                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9789                 </fields>
9790                 <links>
9791                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9792                 </links>
9793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9794                         <actions>
9795                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9796                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9797                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9798                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9799                         </actions>
9800                 </permacrud>
9801         </class>
9802
9803         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9804                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9805                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9806                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9807                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9808                 </fields>
9809                 <links>
9810                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9811                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9812                 </links>
9813         </class>
9814
9815         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9816                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9817                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9818                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9819                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9820                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9821                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9822                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9823                 </fields>
9824                 <links>
9825                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9826                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9827                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9828                 </links>
9829         </class>
9830
9831         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9832                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9833                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9834                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9835                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9836                 </fields>
9837                 <links>
9838                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9839                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9840                 </links>
9841         </class>
9842
9843         <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">
9844                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9845                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9846                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9847                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9848                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9849                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9850                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9851                 </fields>
9852                 <links>
9853                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9854                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9855                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9856                 </links>
9857         </class>
9858
9859         <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">
9860                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9861                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9862                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9863                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9864                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9865                 </fields>
9866                 <links>
9867                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9868                 </links>
9869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9870             <actions>
9871                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9872                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9873                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9874                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9875             </actions>
9876                 </permacrud>
9877         </class>
9878
9879         <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">
9880                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9881                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9882                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9883                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9884                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9885                 </fields>
9886                 <links>
9887                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9888                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9889                 </links>
9890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9891                         <actions>
9892                                 <create permission="ADMIN_CLAIM_POLICY">
9893                                         <context link="claim_policy" field="org_unit"/>
9894                 </create>
9895                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9896                                         <context link="claim_policy" field="org_unit"/>
9897                 </retrieve>
9898                                 <update permission="ADMIN_CLAIM_POLICY">
9899                                         <context link="claim_policy" field="org_unit"/>
9900                 </update>
9901                                 <delete permission="ADMIN_CLAIM_POLICY">
9902                                         <context link="claim_policy" field="org_unit"/>
9903                 </delete>
9904                         </actions>
9905                 </permacrud>
9906         </class>
9907
9908     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9909         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9910             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9911             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9912             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9913             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9914             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9915             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9916             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9917             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9918             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9919             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9920             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9921             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9922             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9923             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9924             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9925             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9926         </fields>
9927         <links>
9928             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9929         </links>
9930     </class>
9931
9932     <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">
9933         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9934             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9935             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9936             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9937             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9938             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9939         </fields>
9940     </class>
9941
9942     <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">
9943         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9944             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9945             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9946             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9947             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9948             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9949             <field reporter:label="City" name="city" reporter:datatype="text"/>
9950             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9951             <field reporter:label="State" name="state" reporter:datatype="text"/>
9952             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9953             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9954             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9955         </fields>
9956     </class>
9957
9958     <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">
9959         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9960             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9961             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9962             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9963             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9964             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9965             <field reporter:label="City" name="city" reporter:datatype="text"/>
9966             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9967             <field reporter:label="State" name="state" reporter:datatype="text"/>
9968             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9969             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9970             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9971         </fields>
9972     </class>
9973
9974     <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">
9975         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9976             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9977             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9978             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9979             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9980             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9981             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9982         </fields>
9983     </class>
9984
9985     <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">
9986         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9987             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9988             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9989             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9990             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9991             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9992             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9993         </fields>
9994     </class>
9995
9996         <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">
9997                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
9998                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
9999                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10000                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10001                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10002                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10003                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10004                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10005                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10006                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10007                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10008                 </fields>
10009                 <links>
10010                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10011                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10012                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10013                 </links>
10014                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10015                         <actions>
10016                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10017                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10018                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10019                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10020                         </actions>
10021                 </permacrud>
10022         </class>
10023
10024         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10025                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10026                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10027                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10028                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10029                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10030                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10031                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10032                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10033                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10034                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10035                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10036                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10037                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10038                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10039                 </fields>
10040                 <links>
10041                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10042                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10043                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10044                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10045                 </links>
10046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10047                         <actions>
10048                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10049                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10050                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10051                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10052                         </actions>
10053                 </permacrud>
10054         </class>
10055
10056         <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">
10057                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10058                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10059                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10060                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10061                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10062                 </fields>
10063                 <links>
10064                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10065                 </links>
10066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10067                         <actions>
10068                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10069                     <context link="fieldset" field="owning_lib"/>
10070                 </create>
10071                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10072                     <context link="fieldset" field="owning_lib"/>
10073                 </retrieve>
10074                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10075                     <context link="fieldset" field="owning_lib"/>
10076                 </update>
10077                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10078                     <context link="fieldset" field="owning_lib"/>
10079                 </delete>
10080                         </actions>
10081                 </permacrud>
10082         </class>
10083
10084     <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">
10085         <fields>
10086             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10087             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10088             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10089         </fields>
10090                 <links>
10091                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10092                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10093                 </links>
10094     </class>
10095
10096     <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">
10097         <fields>
10098             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10099             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10100         </fields>
10101                 <links>
10102                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10103                 </links>
10104     </class>
10105
10106     <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">
10107         <fields>
10108             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10109             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10110             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10111         </fields>
10112                 <links>
10113                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10114                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10115                 </links>
10116     </class>
10117
10118     <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">
10119         <fields>
10120             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10121             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10122         </fields>
10123                 <links>
10124                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10125                 </links>
10126     </class>
10127
10128     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10129                 <oils_persist:source_definition>
10130
10131             SELECT  DISTINCT l.*
10132               FROM  action.unfulfilled_hold_loops l
10133                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10134               WHERE l.count = m.max
10135
10136                 </oils_persist:source_definition>
10137         <fields>
10138             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10139             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10140             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10141         </fields>
10142                 <links>
10143                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10144                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10145                 </links>
10146     </class>
10147
10148         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10149                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10150                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10151                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10152                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10153                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10154                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10155                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10156                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10157                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10158                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10159                 </fields>
10160                 <links>
10161                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10162                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10163                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10164                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10165                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10166                 </links>
10167         </class>
10168
10169         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10170                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10171                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10172                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10173                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10174                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10175                 </fields>
10176                 <links>
10177                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10178                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10179                 </links>
10180         </class>
10181
10182         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10183                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10184                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10185                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10186                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10187                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10188                 </fields>
10189                 <links>
10190                 </links>
10191         </class>
10192
10193         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10194                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10195                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10196                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10197                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10198                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10199                 </fields>
10200                 <links>
10201                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10202                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10203                 </links>
10204         </class>
10205         
10206         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10207                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10208                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10209                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10210                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10211                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10212                 </fields>
10213                 <links>
10214                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10215                 </links>
10216         </class>
10217         
10218         <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">
10219                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10220                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10221                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10222                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10223                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10224                 </fields>
10225                 <links>
10226                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10227                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10228                 </links>
10229         </class>
10230
10231         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10232                 <fields oils_persist:primary="name">
10233                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10234                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10235                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10236                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10237                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10238                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10239                 </fields>
10240                 <links>
10241                 </links>
10242         </class>
10243
10244         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10245                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10246                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10247                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10248                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10249                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10250                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10251                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10252                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10253                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10254                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10255                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10256                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10257                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10258                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10259                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10260                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10261                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10262                 </fields>
10263                 <links>
10264                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10265                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10266                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10267                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10268                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10269                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10270                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10271                 </links>
10272         </class>
10273
10274         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10275                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10276                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10277                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10278                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10279                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10280                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10281                 </fields>
10282                 <links>
10283                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10284                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10285                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10286                 </links>
10287         </class>
10288
10289         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10290                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10291                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10292                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10293                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10294                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10295                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10296                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10297                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10298                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10299                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10300                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10301                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10302                 </fields>
10303                 <links>
10304                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10305                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10306                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10307                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10308                 </links>
10309         </class>
10310
10311         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10312                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10313                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10314                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10315                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10316                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10317                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10318                 </fields>
10319                 <links>
10320                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10321                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10322                 </links>
10323         </class>
10324
10325         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10326                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10327                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10328                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10329                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10330                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10331                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10332                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10333                 </fields>
10334                 <links>
10335                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10336                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10337                 </links>
10338         </class>
10339
10340         <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">
10341                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10342                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10343                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10344                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10345                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10346                 </fields>
10347                 <links>
10348                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10349                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10350                 </links>
10351         </class>
10352
10353         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10354                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10355                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10356                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10357                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10358                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10359                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10360                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10361                 </fields>
10362                 <links>
10363                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10364                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10365                 </links>
10366         </class>
10367
10368         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10369                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10370                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10371                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10372                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10373                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10374                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10375                 </fields>
10376                 <links>
10377                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10378                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10379                 </links>
10380         </class>
10381
10382         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10383                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10384                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10385                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10386                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10387                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10388                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10389                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10390                 </fields>
10391                 <links>
10392                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10393                 </links>
10394         </class>
10395
10396         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10397                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10398                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10399                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10400                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10401                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10402                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10403                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10404                 </fields>
10405                 <links>
10406                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10407                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10408                 </links>
10409         </class>
10410
10411         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10412                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10413                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10414                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10415                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10416                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10417                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10418                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10419                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10420                 </fields>
10421                 <links>
10422                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10423                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10424                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10425                 </links>
10426         </class>
10427
10428         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10429                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10430                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10431                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10432                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10433                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10434                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10435                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10436                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10437                 </fields>
10438                 <links>
10439                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10440                 </links>
10441         </class>
10442
10443         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10444                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10445                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10446                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10447                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10448                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10449                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10450                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10451                 </fields>
10452                 <links>
10453                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10454                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10455                 </links>
10456         </class>
10457
10458         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10459                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10460                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10461                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10462                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10463                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10464                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10465                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10466                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10467                 </fields>
10468                 <links>
10469                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10470                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10471                 </links>
10472         </class>
10473
10474         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10475                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10476                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10477                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10478                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10479                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10480                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10481                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10482                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10483                 </fields>
10484                 <links>
10485                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10486                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10487                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10488                 </links>
10489         </class>
10490
10491         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10492                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10493                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10494                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10495                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10496                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10497                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10498                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10499                 </fields>
10500                 <links>
10501                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10502                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10503                 </links>
10504         </class>
10505
10506         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10507                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10508                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10509                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10510                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10511                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10512                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10513                 </fields>
10514                 <links>
10515                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10516                 </links>
10517         </class>
10518
10519         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10520                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10521                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10522                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10523                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10524                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10525                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10526                 </fields>
10527                 <links>
10528                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10529                 </links>
10530         </class>
10531
10532         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10533                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10534                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10535                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10536                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10537                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10538                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10539                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10540                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10541                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10542                 </fields>
10543                 <links>
10544                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10545                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10546                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10547                 </links>
10548         </class>
10549
10550         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10551                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10552                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10553                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10554                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10555                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10556                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10557                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10558                 </fields>
10559                 <links>
10560                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10561                 </links>
10562         </class>
10563
10564         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10565                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10566                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10567                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10568                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10569                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10570                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10571                 </fields>
10572                 <links>
10573                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10574                 </links>
10575         </class>
10576
10577         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10578                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10579                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10580                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10581                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10582                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10583                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10584                 </fields>
10585                 <links>
10586                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10587                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10588                 </links>
10589         </class>
10590
10591         <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">
10592                 <fields oils_persist:primary="id">
10593                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10594                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10595                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10596                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10597                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10598                 </fields>
10599                 <links>
10600                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10601                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10602                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10603                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10604                 </links>
10605         </class>
10606
10607         <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">
10608                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10609                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10610                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10611                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10612                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10613                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10614                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10615                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10616                 </fields>
10617                 <links/>
10618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10619                         <actions>
10620                                 <retrieve/>
10621                         </actions>
10622                 </permacrud>
10623         </class>
10624
10625         <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">
10626                 <fields oils_persist:primary="ptype_key">
10627                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10628                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10629                 </fields>
10630                 <links/>
10631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10632                         <actions>
10633                                 <retrieve/>
10634                         </actions>
10635                 </permacrud>
10636         </class>
10637
10638         <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">
10639                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10640                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10641                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10642                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10643                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10644                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10645                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10646                 </fields>
10647                 <links>
10648                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10649                 </links>
10650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10651                         <actions>
10652                                 <retrieve/>
10653                         </actions>
10654                 </permacrud>
10655         </class>
10656
10657         <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">
10658                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10659                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10660                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10661                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10662                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10663                 </fields>
10664                 <links>
10665                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10666                 </links>
10667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10668                         <actions>
10669                                 <retrieve/>
10670                         </actions>
10671                 </permacrud>
10672         </class>
10673
10674     <class
10675         id="uvs"
10676         controller="open-ils.cstore open-ils.pcrud"
10677         oils_obj:fieldmapper="url_verify::session"
10678         oils_persist:tablename="url_verify.session"
10679         reporter:label="URL Verification Session"
10680     >
10681         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10682             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10683             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10684                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10685             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10686             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10687             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10688             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10689             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10690             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10691         </fields>
10692
10693         <links>
10694             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10695             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10696             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10697             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10698             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10699         </links>
10700
10701         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10702             <actions>
10703                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10704             </actions>
10705         </permacrud>
10706
10707     </class>
10708
10709     <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">
10710         <oils_persist:source_definition>
10711             SELECT
10712                 cbrebi.id AS id,  -- so we can have a pkey in our view
10713                 uvs.id AS session,
10714                 uvs.owning_lib,
10715                 cbrebi.target_biblio_record_entry
10716             FROM url_verify.session uvs
10717             JOIN container.biblio_record_entry_bucket cbreb
10718                 ON (uvs.container = cbreb.id)
10719             JOIN container.biblio_record_entry_bucket_item cbrebi
10720                 ON (cbrebi.bucket = cbreb.id)
10721         </oils_persist:source_definition>
10722         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10723             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10724             <field reporter:label="Session" name="session" reporter:datatype="link" />
10725             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10726             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10727         </fields>
10728         <links>
10729             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10730             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10731             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10732         </links>
10733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10734             <actions>
10735                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10736             </actions>
10737         </permacrud>
10738     </class>
10739
10740     <class
10741         id="uvus"
10742         controller="open-ils.cstore open-ils.pcrud"
10743         oils_obj:fieldmapper="url_verify::url_selector"
10744         oils_persist:tablename="url_verify.url_selector"
10745         reporter:label="URL Verification URL Selector"
10746     >
10747         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10748             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10749             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10750                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10751             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10752         </fields>
10753
10754         <links>
10755             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10756             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10757         </links>
10758
10759         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10760             <actions>
10761                 <create permission="URL_VERIFY">
10762                     <context link="session" field="owning_lib"/>
10763                 </create>
10764                 <retrieve permission="URL_VERIFY">
10765                     <context link="session" field="owning_lib"/>
10766                 </retrieve>
10767                 <update permission="URL_VERIFY">
10768                     <context link="session" field="owning_lib"/>
10769                 </update>
10770                 <delete permission="URL_VERIFY">
10771                     <context link="session" field="owning_lib"/>
10772                 </delete>
10773             </actions>
10774         </permacrud>
10775
10776     </class>
10777
10778     <class
10779         id="uvu"
10780         controller="open-ils.cstore open-ils.pcrud"
10781         oils_obj:fieldmapper="url_verify::url"
10782         oils_persist:tablename="url_verify.url"
10783         reporter:label="URL Verification URL"
10784     >
10785         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10786             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10787                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10788                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10789                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10790                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10791             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10792             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10793             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10794             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10795             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10796             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10797             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10798             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10799             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10800             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10801             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10802             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10803             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10804         </fields>
10805
10806         <links>
10807             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10808             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10809             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10810             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10811             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10812         </links>
10813
10814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10815             <actions>
10816                 <create permission="URL_VERIFY">
10817                     <context link="session" field="owning_lib"/>
10818                 </create>
10819                 <retrieve permission="URL_VERIFY">
10820                     <context link="session" field="owning_lib"/>
10821                 </retrieve>
10822                 <update permission="URL_VERIFY">
10823                     <context link="session" field="owning_lib"/>
10824                 </update>
10825                 <delete permission="URL_VERIFY">
10826                     <context link="session" field="owning_lib"/>
10827                 </delete>
10828             </actions>
10829         </permacrud>
10830
10831     </class>
10832
10833     <class
10834         id="uvva"
10835         controller="open-ils.cstore open-ils.pcrud"
10836         oils_obj:fieldmapper="url_verify::verification_attempt"
10837         oils_persist:tablename="url_verify.verification_attempt"
10838         reporter:label="URL Verification Attempt"
10839     >
10840         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10841             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10842                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10843                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10844             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10845             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10846         </fields>
10847
10848         <links>
10849             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10850             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10851         </links>
10852
10853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10854             <actions>
10855                 <create permission="URL_VERIFY">
10856                     <context link="session" field="owning_lib"/>
10857                 </create>
10858                 <retrieve permission="URL_VERIFY">
10859                     <context link="session" field="owning_lib"/>
10860                 </retrieve>
10861                 <update permission="URL_VERIFY">
10862                     <context link="session" field="owning_lib"/>
10863                 </update>
10864                 <delete permission="URL_VERIFY">
10865                     <context link="session" field="owning_lib"/>
10866                 </delete>
10867             </actions>
10868         </permacrud>
10869
10870     </class>
10871
10872     <class
10873         id="uvuv"
10874         controller="open-ils.cstore open-ils.pcrud"
10875         oils_obj:fieldmapper="url_verify::url_verification"
10876         oils_persist:tablename="url_verify.url_verification"
10877         reporter:label="URL Verification"
10878     >
10879         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10880             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10881                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10882                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10883             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10884             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10885             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10886             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10887                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10888         </fields>
10889
10890         <links>
10891             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10892             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10893             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10894         </links>
10895
10896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10897             <actions>
10898                 <create permission="URL_VERIFY">
10899                     <context link="attempt" jump="session" field="owning_lib"/>
10900                 </create>
10901                 <retrieve permission="URL_VERIFY">
10902                     <context link="attempt" jump="session" field="owning_lib"/>
10903                 </retrieve>
10904                 <update permission="URL_VERIFY">
10905                     <context link="attempt" jump="session" field="owning_lib"/>
10906                 </update>
10907                 <delete permission="URL_VERIFY">
10908                     <context link="attempt" jump="session" field="owning_lib"/>
10909                 </delete>
10910             </actions>
10911         </permacrud>
10912
10913     </class>
10914
10915         <class
10916                 id="cfdi"
10917                 controller="open-ils.cstore open-ils.pcrud"
10918                 oils_obj:fieldmapper="config::filter_dialog_interface"
10919                 oils_persist:tablename="config.filter_dialog_interface"
10920                 reporter:label="FilterDialog Interface">
10921                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10922                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10923                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10924                 </fields>
10925                 <links>
10926                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10927                 </links>
10928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10929                         <actions>
10930                                 <retrieve />
10931                         </actions>
10932                 </permacrud>
10933         </class>
10934
10935         <class
10936                 id="cfdfs"
10937                 controller="open-ils.cstore open-ils.pcrud"
10938                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10939                 oils_persist:tablename="config.filter_dialog_filter_set"
10940                 reporter:label="FilterDialog Filter Set">
10941                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10942                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10943                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10944                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10945                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10946                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10947                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10948                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10949                 </fields>
10950                 <links>
10951                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10952                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10953                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10954                 </links>
10955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10956                         <actions>
10957                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10958                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10959                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10960                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10961                         </actions>
10962                 </permacrud>
10963
10964         </class>
10965
10966         <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">
10967                 <fields oils_persist:primary="code">
10968                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10969                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10970                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10971                 </fields>
10972                 <links/>
10973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10974                         <actions>
10975                                 <retrieve/>
10976                         </actions>
10977                 </permacrud>
10978         </class>
10979
10980         <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">
10981                 <oils_persist:source_definition>
10982
10983             SELECT  b.id,
10984                     MAX(dcp.edit_date) AS last_delete_date
10985              FROM   biblio.record_entry b
10986                     JOIN asset.call_number cn ON (cn.record = b.id)
10987                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10988              WHERE  NOT b.deleted
10989              GROUP BY b.id
10990              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10991
10992                 </oils_persist:source_definition>
10993                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10994                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10995                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10996                 </fields>
10997                 <links>
10998                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10999                 </links>
11000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11001                         <actions>
11002                                 <retrieve/>
11003                         </actions>
11004                 </permacrud>
11005         </class>
11006
11007         <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">
11008                 <oils_persist:source_definition>
11009
11010             -- -- 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.
11011             -- -- 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
11012             -- -- may not.
11013             -- SELECT
11014             --     bre.id AS bib_id,
11015             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11016             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11017             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11018             -- FROM (
11019                 SELECT
11020                     y.bre AS id,
11021                     COALESCE( x.copy_count, 0 ) AS copy_count,
11022                     y.hold_count AS hold_count,
11023                     (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
11024                 FROM (
11025                         SELECT
11026                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11027                             COUNT(*) AS hold_count
11028                         FROM action.hold_request h
11029                         WHERE
11030                             cancel_time IS NULL
11031                             AND fulfillment_time IS NULL
11032                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11033                         GROUP BY 1
11034                     )y LEFT JOIN (
11035                         SELECT 
11036                             (SELECT id
11037                                 FROM biblio.record_entry 
11038                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11039                             ) AS bre, 
11040                             COUNT(*) AS copy_count
11041                         FROM asset.copy
11042                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11043                         WHERE copy.holdable 
11044                             AND NOT copy.deleted 
11045                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11046                         GROUP BY 1
11047                     )x ON x.bre = y.bre
11048                 -- )z RIGHT JOIN (
11049                 --     SELECT id
11050                 --     FROM biblio.record_entry
11051                 --     WHERE NOT deleted
11052                 -- )bre ON (z.bib_id = bre.id)
11053                 
11054
11055                 </oils_persist:source_definition>
11056                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11057                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11058                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11059                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11060                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11061                 </fields>
11062                 <links>
11063                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11064                 </links>
11065                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11066                         <actions>
11067                                 <retrieve/>
11068                         </actions>
11069                 </permacrud>
11070         </class>
11071
11072         <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">
11073                 <oils_persist:source_definition>
11074             SELECT *,
11075                 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,
11076                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11077             FROM
11078                 (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
11079                     FROM
11080                         action.hold_request ahr
11081                         JOIN reporter.hold_request_record rhrr USING (id)
11082                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11083                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11084                     WHERE
11085                         ahr.cancel_time IS NULL
11086                         AND ahr.fulfillment_time IS NULL
11087                     GROUP BY bib_record, pickup_lib
11088                 )x
11089                 JOIN
11090                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11091                     FROM
11092                         action.hold_request ahr
11093                         JOIN reporter.hold_request_record rhrr USING (id)
11094                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11095                     WHERE
11096                         ahr.cancel_time IS NULL
11097                         AND ahr.fulfillment_time IS NULL
11098                     GROUP BY bib_record
11099                 )y
11100                 USING (id)
11101                 </oils_persist:source_definition>
11102                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11103                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11104                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11105                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11106                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11107                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11108                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11109                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11110                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11111                 </fields>
11112                 <links>
11113                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11114                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11115                 </links>
11116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11117                         <actions>
11118                                 <retrieve/>
11119                         </actions>
11120                 </permacrud>
11121         </class>
11122
11123         <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) ">
11124                 <oils_persist:source_definition>
11125             WITH counts_at_ou AS (
11126                 SELECT  rhrr.bib_record AS id,
11127                         aou.id AS pickup_lib_or_desc,
11128                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11129                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11130                   FROM  actor.org_unit aou
11131                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11132                         action.hold_request ahr
11133                         JOIN reporter.hold_request_record rhrr USING (id)
11134                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11135                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11136                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11137                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11138                         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
11139                   GROUP BY 1, 2
11140             )
11141             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11142                    y.holds_everywhere, y.copy_count_everywhere,
11143                 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,
11144                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11145             FROM counts_at_ou x
11146                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11147                     FROM
11148                         action.hold_request ahr
11149                         JOIN reporter.hold_request_record rhrr USING (id)
11150                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11151                     WHERE
11152                         ahr.cancel_time IS NULL
11153                         AND ahr.fulfillment_time IS NULL
11154                     GROUP BY bib_record
11155                 )y
11156                 USING (id)
11157                 </oils_persist:source_definition>
11158                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11159                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11160                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11161                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11162                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11163                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11164                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11165                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11166                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11167                 </fields>
11168                 <links>
11169                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11170                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11171                 </links>
11172                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11173                         <actions>
11174                                 <retrieve/>
11175                         </actions>
11176                 </permacrud>
11177         </class>
11178
11179         <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">
11180                 <oils_persist:source_definition>
11181             SELECT
11182                 ac.id,
11183                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11184                 MAX(actac.xact_start) AS last_circ
11185             FROM asset.copy ac
11186                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11187             GROUP BY ac.id
11188
11189             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11190             --SELECT
11191             --    ac.id,
11192             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11193             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11194             --FROM asset.copy ac
11195             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11196             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11197             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11198                 </oils_persist:source_definition>
11199                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11200                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11201                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11202                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11203                 </fields>
11204                 <links>
11205                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11206                 </links>
11207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11208                         <actions>
11209                                 <retrieve/>
11210                         </actions>
11211                 </permacrud>
11212         </class>
11213
11214         <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">
11215                 <fields oils_persist:primary="id">
11216                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11217                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11218                 </fields>
11219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11220                         <actions>
11221                                 <retrieve/>
11222                         </actions>
11223                 </permacrud>
11224         </class>
11225
11226         <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">
11227                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11228                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11229                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11230                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11231                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11232                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11233                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11234                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11235                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11236                 </fields>
11237                 <links>
11238                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11239                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11240                 </links>
11241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11242                         <actions>
11243                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11244                                 <retrieve/>
11245                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11246                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11247                         </actions>
11248                 </permacrud>
11249         </class>
11250
11251         <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">
11252                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11253                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11254                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11255                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11256                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11257                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11258                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11259                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11260                 </fields>
11261                 <links>
11262                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11263                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11264                 </links>
11265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11266                         <actions>
11267                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11268                                 <retrieve/>
11269                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11270                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11271                         </actions>
11272                 </permacrud>
11273         </class>
11274
11275
11276         <!-- ********************************************************************************************************************* -->
11277         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11278         <!-- ********************************************************************************************************************* -->
11279         <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">
11280                 <fields oils_persist:primary="id">
11281                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11282                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11283                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11284                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11285                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11286                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11287                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11288                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11289                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11290                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11291                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11292                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11293                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11294                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11295                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11296                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11297                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11298                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11299                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11300                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11301                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11302                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11303                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11304                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11305                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11306                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11307                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11308                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11309                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11310                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11311                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11312                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11313                 </fields>
11314                 <links>
11315                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11316                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11317                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11318                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11319                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11320                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11321                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11322                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11323                 </links>
11324         </class>
11325
11326         <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">
11327                 <fields oils_persist:primary="id">
11328                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11329                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11330                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11331                 </fields>
11332                 <links>
11333                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11334                 </links>
11335         </class>
11336
11337         <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">
11338                 <fields oils_persist:primary="id">
11339                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11340                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11341                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11342                 </fields>
11343                 <links>
11344                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11345                 </links>
11346         </class>
11347
11348         <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">
11349                 <fields oils_persist:primary="id">
11350                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11351
11352                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11353                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11354                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11355
11356                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11357                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11358                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11359
11360                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11361                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11362
11363                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11364                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11365                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11366
11367                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11368                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11369
11370                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11371                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11372                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11373
11374                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11375                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11376                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11377
11378                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11379                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11380                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11381                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11382
11383                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11384                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11385
11386                 </fields>
11387                 <links>
11388                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11389                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11390                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11391                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11392                 </links>
11393         </class>
11394
11395         <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">
11396                 <oils_persist:source_definition>
11397
11398             SELECT
11399                 po.ordering_agency AS ordering_agency,
11400                 po.id AS purchase_order,
11401                 li.id AS lineitem,
11402                 lid.id AS lineitem_detail,
11403                 cpa.id AS claim_policy_action
11404             FROM
11405                 acq.lineitem_detail lid
11406                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11407                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11408                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11409                 JOIN acq.claim_policy_action cpa ON (
11410                     cpa.claim_policy = cp.id
11411
11412                     -- we only care about claim policy actions whose claim
11413                     -- interval we'd reached or exceeded
11414                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11415
11416                     -- filter out all claim policy actions where claim events
11417                     -- have occurred on or after the action's action_interval
11418                     AND NOT EXISTS (
11419                         SELECT 1
11420                         FROM
11421                             acq.claim_event evt
11422                             JOIN acq.claim claim ON (
11423                                 claim.id = evt.claim
11424                                 AND claim.lineitem_detail = lid.id
11425                             )
11426                         WHERE
11427                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11428                     )
11429                 )
11430             WHERE
11431                 lid.cancel_reason IS NULL
11432                 AND li.cancel_reason IS NULL -- belt/suspenders
11433                 AND po.cancel_reason IS NULL -- belt/suspenders
11434                 AND lid.recv_time IS NULL
11435                 AND po.state = 'on-order'
11436             ORDER BY 1, 2, 3, 4, 5
11437
11438                 </oils_persist:source_definition>
11439                 <fields>
11440                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11441                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11442                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11443                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11444                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11445                 </fields>
11446                 <links>
11447                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11448                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11449                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11450                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11451                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11452                 </links>
11453         </class>
11454         <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">
11455                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11456                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11457                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11458                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11459                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11460                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11461                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11462                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11463                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11464                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11465                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11466                 </fields>
11467                 <links>
11468                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11469                 </links>
11470     </class>
11471         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11472                 <oils_persist:source_definition>
11473             SELECT * FROM acq.lineitem_summary 
11474                                 WHERE item_count > (invoice_count + cancel_count)
11475         </oils_persist:source_definition>
11476                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11477                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11478                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11479                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11480                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11481                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11482                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11483                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11484                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11485                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11486                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11487                 </fields>
11488                 <links>
11489                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11490                 </links>
11491     </class>
11492         <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">
11493                 <oils_persist:source_definition>
11494
11495                         SELECT  t.*
11496                           FROM  action.transit_copy t
11497                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11498                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11499                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11500
11501                 </oils_persist:source_definition>
11502                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11503                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11504                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11505                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11506                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11507                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11508                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11509                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11510                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11511                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11512                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11513                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11514                 </fields>
11515                 <links>
11516                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11517                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11518                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11519                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11520                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11521                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11522                 </links>
11523         </class>
11524
11525     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11526                 <oils_persist:source_definition>
11527
11528         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11529                 SELECT
11530                         cp.id as copy,
11531                         COUNT(circ.id),
11532                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11533                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11534                 FROM
11535                         asset.copy cp
11536                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11537                 GROUP BY 1, 3, 4
11538                 UNION ALL
11539                 SELECT
11540                         cp.id as copy,
11541                         COUNT(circ.id),
11542                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11543                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11544                 FROM
11545                         asset.copy cp
11546                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11547                 GROUP BY 1, 3, 4
11548                 UNION ALL
11549                 SELECT
11550                         id as copy,
11551                         circ_count,
11552                         -1 AS year,
11553                         false as is_renewal
11554                 FROM
11555                         extend_reporter.legacy_circ_count
11556         )x GROUP BY 1, 3, 4
11557
11558                 </oils_persist:source_definition>
11559         <fields>
11560             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11561             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11562             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11563             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11564         </fields>
11565                 <links>
11566                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11567                 </links>
11568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11569                         <actions>
11570                                 <retrieve/>
11571                         </actions>
11572                 </permacrud>
11573     </class>
11574
11575         <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">
11576                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11577                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11578                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11579                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11580                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11581                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11582                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11583                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11584                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11585                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11586                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11587                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11588                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11589                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11590                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11591                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11592                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11593                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11594                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11595                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11596                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11597                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11598                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11599                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11600                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11601                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11602                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11603                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11604                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11605                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11606                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11607                 </fields>
11608                 <links>
11609                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11610                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11611                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11612                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11613                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11614                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11615                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11616                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11617                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11618                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11619                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11620                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11621                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11622                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11623                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11624                 </links>
11625         </class>
11626
11627     <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">
11628         <fields oils_persist:primary="id">
11629             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11630             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11631             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11632             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11633             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11634             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11635             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11636             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11637             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11638             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11639             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11640             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11641             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11642             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11643             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11644             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11645             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11646             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11647             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11648             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11649             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11650             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11651             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11652             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11653             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11654             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11655             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11656             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11657             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11658             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11659             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11660             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11661             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11662             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11663         </fields>
11664         <links>
11665             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11666             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11667             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11668             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11669             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11670             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11671             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11672             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11673         </links>
11674     </class>
11675
11676     <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">
11677         <fields oils_persist:primary="id">
11678             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11679             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11680             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11681             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11682         </fields>
11683         <links>
11684             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11685             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11686         </links>
11687     </class>
11688
11689     <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">
11690         <fields oils_persist:primary="owning_lib">
11691             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11692             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11693             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11694         </fields>
11695         <links>
11696             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11697         </links>
11698     </class>
11699
11700     <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">
11701         <fields oils_persist:primary="id">
11702             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11703             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11704             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11705             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11706             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11707         </fields>
11708         <links>
11709             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11710             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11711             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11712         </links>
11713     </class>
11714
11715     <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">
11716         <fields oils_persist:primary="circ_lib">
11717             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11718             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11719             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11720             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11721         </fields>
11722         <links>
11723             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11724             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11725         </links>
11726     </class>
11727
11728     <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">
11729         <fields oils_persist:primary="id">
11730             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11731             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11732             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11733             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11734             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11735         </fields>
11736         <links>
11737             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11738             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11739             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11740         </links>
11741     </class>
11742
11743     <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">
11744         <fields oils_persist:primary="home_ou">
11745             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11746             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11747             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11748             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11749         </fields>
11750         <links>
11751             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11752             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11753         </links>
11754     </class>
11755         <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">
11756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11757                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11758                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11759                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11760                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11761                 </fields>
11762                 <links>
11763                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11764                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11765                 </links>
11766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11767                         <actions>
11768                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11769                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11770                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11771                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11772                         </actions>
11773                 </permacrud>
11774         </class>
11775         <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">
11776                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11777                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11778                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11779                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11780                 </fields>
11781                 <links>
11782                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11783                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11784                         </links>
11785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11786                 <actions>
11787                                 <create permission="ADMIN_ACQ_FUND_TAG">
11788                                         <context link="tag" field="owner"/>
11789                                 </create>
11790                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11791                                         <context link="tag" field="owner"/>
11792                                 </retrieve>
11793                                 <update permission="ADMIN_ACQ_FUND_TAG">
11794                                         <context link="tag" field="owner"/>
11795                                 </update>
11796                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11797                                         <context link="tag" field="owner"/>
11798                                 </delete>
11799                         </actions>
11800                 </permacrud>
11801         </class>
11802         <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">
11803                 <oils_persist:source_definition><![CDATA[
11804                 SELECT
11805                         poi.purchase_order AS purchase_order,
11806                         ii.invoice AS invoice,
11807                         NULL AS lineitem,
11808                         poi.id AS po_item,
11809                         NULL AS picklist
11810                 FROM
11811                         acq.po_item poi
11812                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11813                 UNION SELECT
11814                         jub.purchase_order AS purchase_order,
11815                         ie.invoice AS invoice,
11816                         jub.id AS lineitem,
11817                         NULL AS po_item,
11818                         jub.picklist AS picklist
11819                 FROM
11820                         acq.lineitem jub
11821                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11822                 UNION SELECT
11823                         ii.purchase_order AS purchase_order,
11824                         ii.invoice AS invoice,
11825                         NULL AS lineitem,
11826                         NULL AS po_item,
11827                         NULL AS picklist
11828                 FROM
11829                         acq.invoice_item ii
11830                 WHERE ii.po_item IS NULL
11831                 UNION SELECT
11832                         ie.purchase_order AS purchase_order,
11833                         ie.invoice AS invoice,
11834                         NULL AS lineitem,
11835                         NULL AS po_item,
11836                         NULL AS picklist
11837                 FROM
11838                         acq.invoice_entry ie
11839                 WHERE ie.lineitem IS NULL
11840                 UNION SELECT
11841                         NULL AS purchase_order,
11842                         NULL AS invoice,
11843                         jub.id AS lineitem,
11844                         NULL AS po_item,
11845                         jub.picklist AS picklist
11846                 FROM
11847                         acq.lineitem jub
11848                 WHERE jub.purchase_order IS NULL
11849                 ]]></oils_persist:source_definition>
11850                 <fields>
11851                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11852                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11853                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11854                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11855                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11856                 </fields>
11857                 <links>
11858                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11859                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11860                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11861                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11862                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11863                 </links>
11864         </class>
11865         <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">
11866                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11867                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11868                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11869                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11870                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11871                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11872                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11873                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11874                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11875                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11876                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11877                 </fields>
11878                 <links>
11879                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11880                 </links>
11881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11882                         <actions>
11883                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11884                                 <retrieve/>
11885                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11886                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11887                         </actions>
11888                 </permacrud>
11889         </class>
11890
11891         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
11892                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11893                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11894                         <field name="date_applied" reporter:datatype="timestamp"/>
11895                         <field name="org" reporter:datatype="org_unit"/>
11896                         <field name="original_value" reporter:datatype="text"/>
11897                         <field name="new_value" reporter:datatype="text"/>
11898                         <field name="field_name" reporter:datatype="link"/>
11899                 </fields>
11900                 <links>
11901                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11902                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11903                 </links>
11904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11905                         <actions>
11906                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11907                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11908                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11909                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11910                         </actions>
11911                 </permacrud>
11912         </class>
11913         <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">
11914                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11915                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11916                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11917                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11918                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11919                 </fields>
11920                 <links>
11921                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11922                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11923                 </links>
11924         </class>
11925         <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">
11926                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11927                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11928                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11929                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11930                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11931                 </fields>
11932                 <links>
11933                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11934                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11935                 </links>
11936         </class>
11937         <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">
11938                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11939                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
11940                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11941                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11942                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11943                 </fields>
11944                 <links>
11945                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11946                 </links>
11947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11948                         <actions>
11949                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11950                                 <retrieve/>
11951                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11952                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11953                         </actions>
11954                 </permacrud>
11955         </class>
11956         <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">
11957                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11958                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11959                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11960                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11961                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11962                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11963                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11964                 </fields>
11965                 <links>
11966                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11967                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11968                 </links>
11969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11970                         <actions>
11971                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11972                                 <retrieve/>
11973                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11974                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11975                         </actions>
11976                 </permacrud>
11977         </class>
11978         <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">
11979                 <fields oils_persist:primary="code">
11980                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
11981                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
11982                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11983                 </fields>
11984                 <links>
11985                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11986                 </links>
11987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11988                         <actions>
11989                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11990                                 <retrieve/>
11991                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11992                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11993                         </actions>
11994                 </permacrud>
11995         </class>
11996         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
11997                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
11998                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11999                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12000                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12001                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12002                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12003                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12004                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12005                 </fields>
12006                 <links>
12007                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12008                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12009                 </links>
12010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12011                         <actions>
12012                                 <create permission="ADMIN_COPY_TAGS" context_field="owner"/>
12013                                 <retrieve/>
12014                                 <update permission="ADMIN_COPY_TAGS" context_field="owner"/>
12015                                 <delete permission="ADMIN_COPY_TAGS" context_field="owner"/>
12016                         </actions>
12017                 </permacrud>
12018         </class>
12019         <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">
12020                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12021                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12022                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12023                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12024                 </fields>
12025                 <links>
12026                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12027                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12028                 </links>
12029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12030                         <actions>
12031                                 <create permission="UPDATE_COPY">
12032                     <context link="copy" field="circ_lib"/>
12033                 </create>
12034                                 <retrieve/>
12035                                 <update permission="UPDATE_COPY">
12036                     <context link="copy" field="circ_lib"/>
12037                 </update>
12038                                 <delete permission="UPDATE_COPY">
12039                     <context link="copy" field="circ_lib"/>
12040                 </delete>
12041                         </actions>
12042                 </permacrud>
12043         </class>
12044         <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">
12045         <oils_persist:source_definition>
12046         SELECT ahcm.target_copy AS id,count(*) AS count
12047          FROM
12048          action.hold_request ahr,
12049          action.hold_copy_map ahcm
12050          WHERE
12051          ahr.cancel_time IS NULL AND
12052          ahr.fulfillment_time IS NULL AND
12053          ahr.capture_time IS NULL AND
12054          ahr.id = ahcm.hold
12055          GROUP BY ahcm.target_copy
12056         </oils_persist:source_definition>
12057         <fields oils_persist:primary="id">
12058             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12059             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12060         </fields>
12061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12062             <actions>
12063                <retrieve/>
12064             </actions>
12065         </permacrud>
12066         </class>
12067
12068         <!-- ********************************************************************************************************************* -->
12069
12070 </IDL>
12071
12072 <!--
12073     vim:noet:ts=4:sw=4:
12074 -->