]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
d4eb72348a02dff2c08d2f1905e82a774d9c6fe3
[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" 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         </class>
2436         <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">
2437                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2438                         <field name="id" reporter:datatype="id" />
2439                         <field name="item" reporter:datatype="link"/>
2440                         <field name="note" reporter:datatype="text" />
2441                 </fields>
2442                 <links>
2443                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2444                 </links>
2445         </class>
2446
2447         <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">
2448                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2449                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2450                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2451                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2452                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2453                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2454                 </fields>
2455                 <links>
2456                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2457                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2458                 </links>
2459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460                         <actions>
2461                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2462                                 <retrieve/>
2463                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2464                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2465                         </actions>
2466                 </permacrud>
2467         </class>
2468
2469         <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">
2470                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2471                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2472                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2473                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2474                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2475                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2476                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2477                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2478                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2479                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2480                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2481                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2482                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2483                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2484                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2485                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2486                 </fields>
2487                 <links>
2488                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2489                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2490                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2491                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2492                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2493                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2494                 </links>
2495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2496                         <actions>
2497                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2498                                 <retrieve/>
2499                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2500                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2501                         </actions>
2502                 </permacrud>
2503         </class>
2504
2505         <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">
2506                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2507                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2508                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2509                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2510                 </fields>
2511                 <links>
2512                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2513                 </links>
2514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2515                         <actions>
2516                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2517                                 <retrieve/>
2518                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2519                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2520                         </actions>
2521                 </permacrud>
2522         </class>
2523
2524         <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">
2525                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2526                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2527                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2528                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2529                 </fields>
2530                 <links>
2531                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2532                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2533                 </links>
2534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2535                         <actions>
2536                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2537                                 <retrieve/>
2538                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2539                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2540                         </actions>
2541                 </permacrud>
2542         </class>
2543
2544         <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">
2545                 <fields oils_persist:primary="code">
2546                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2547                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2548                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2549                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2550                 </fields>
2551                 <links>
2552                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2553                 </links>
2554                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2555                         <actions>
2556                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2557                                 <retrieve/>
2558                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2559                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2560                         </actions>
2561                 </permacrud>
2562         </class>
2563
2564         <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">
2565                 <fields oils_persist:primary="code">
2566                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2567                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2568                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2569                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2570                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2571                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2572                 </fields>
2573                 <links>
2574                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2575                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2576                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2577                 </links>
2578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2579                         <actions>
2580                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2581                                 <retrieve/>
2582                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2583                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2584                         </actions>
2585                 </permacrud>
2586         </class>
2587
2588     <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">
2589         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2590             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2591             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2592             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2593         </fields>
2594         <links>
2595             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2596             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2597         </links>
2598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2599             <actions>
2600                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2601                 <retrieve/>
2602                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2603                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2604             </actions>
2605         </permacrud>
2606     </class>
2607
2608         <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">
2609                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2610                         <field name="active" reporter:datatype="bool"/>
2611                         <field name="create_date" reporter:datatype="timestamp"/>
2612                         <field name="creator" />
2613                         <field name="deleted" reporter:datatype="bool"/>
2614                         <field name="edit_date" reporter:datatype="timestamp"/>
2615                         <field name="editor" />
2616                         <field name="id" reporter:datatype="id" />
2617                         <field name="last_xact_id" />
2618                         <field name="marc" />
2619                         <field name="source" />
2620                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2621                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2622                         <field name="heading" />
2623                         <field name="simple_heading" />
2624                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2625                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2626                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2627                 </fields>
2628                 <links>
2629                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2631                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2632                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2633                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2634                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2635                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2636                 </links>
2637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2638                         <actions>
2639                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2640                                 <retrieve/>
2641                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2642                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2643                         </actions>
2644                 </permacrud>
2645         </class>
2646         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2648                         <field name="char_encoding" />
2649                         <field name="id" />
2650                         <field name="record" />
2651                         <field name="record_status" />
2652                         <field name="thesaurus" />
2653                 </fields>
2654                 <links>
2655                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2656                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2657                 </links>
2658         </class>
2659         <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">
2660                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2661                         <field name="id" reporter:datatype="id" />
2662                         <field name="bib" reporter:datatype="link" />
2663                         <field name="authority" reporter:datatype="link" />
2664                 </fields>
2665                 <links>
2666                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2667                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2668                 </links>
2669         </class>
2670         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2672                         <field name="id" reporter:datatype="id" />
2673                         <field name="record" reporter:datatype="link" />
2674                         <field name="atag" reporter:datatype="link" />
2675                         <field name="value" reporter:datatype="text" />
2676                 </fields>
2677                 <links>
2678                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2679                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2680                 </links>
2681         </class>
2682         <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">
2683                 <fields oils_persist:primary="code" oils_persist:sequence="">
2684                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2685                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2686                 </fields>
2687                 <links/>
2688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2689             <actions>
2690                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2691                 <retrieve/>
2692                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2693                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2694             </actions>
2695         </permacrud>
2696         </class>
2697         <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">
2698                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2699                         <field name="accepting_usr" />
2700                         <field name="amount" reporter:datatype="money" />
2701                         <field name="amount_collected" reporter:datatype="money" />
2702                         <field name="approval_code" reporter:datatype="text"/>
2703                         <field name="cash_drawer" reporter:datatype="link"/>
2704                         <field name="cc_number" reporter:datatype="text"/>
2705                         <field name="cc_order_number" reporter:datatype="text"/>
2706                         <field name="cc_processor" reporter:datatype="text"/>
2707                         <field name="id" reporter:datatype="id" />
2708                         <field name="note" reporter:datatype="text"/>
2709                         <field name="payment_ts" reporter:datatype="timestamp"/>
2710                         <field name="xact" reporter:datatype="link"/>
2711                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2712                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2713                 </fields>
2714                 <links>
2715                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2716                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2717                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2718                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2719                 </links>
2720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2721             <actions>
2722                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2723                     <context link="xact" jump="usr" field="home_ou"/>
2724                 </retrieve>
2725                         </actions>
2726                 </permacrud>
2727         </class>
2728         <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">
2729                 <fields oils_persist:primary="name">
2730                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2731                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2732                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2733                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2734                 </fields>
2735                 <links/>
2736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2737             <actions>
2738                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2739                 <retrieve/>
2740                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2741                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2742             </actions>
2743         </permacrud>
2744         </class>
2745
2746         <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">
2747                 <fields oils_persist:primary="alias">
2748                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2749                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2750                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2751                 </fields>
2752                 <links>
2753                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2754                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2755                 </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2759                 <retrieve/>
2760                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2761                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2762             </actions>
2763         </permacrud>
2764         </class>
2765
2766         <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">
2767                 <fields oils_persist:primary="name">
2768                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2769                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2770                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2771                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2772                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2773                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2774                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2775                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2776                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2777                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2778                 </fields>
2779                 <links>
2780                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2781                 </links>
2782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2783             <actions>
2784                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2785                 <retrieve/>
2786                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2787                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2788             </actions>
2789         </permacrud>
2790         </class>
2791
2792         <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">
2793                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2794                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2795                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2796                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2797                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2798                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2799                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2800                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2801                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2802                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2803                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2804                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2805                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2806                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2807                 </fields>
2808                 <links>
2809                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2810                 </links>
2811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2812             <actions>
2813                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2814                 <retrieve/>
2815                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2816                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2817             </actions>
2818         </permacrud>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2822                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2823                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2824                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2825                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2826                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2827                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2828                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2829                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2830                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2831                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2832                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2833                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2834                 </fields>
2835                 <links>
2836                 </links>
2837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2838                         <actions>
2839                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2840                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2841                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2842                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2843                         </actions>
2844                 </permacrud>
2845         </class>
2846         <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">
2847                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2848                         <field name="id" reporter:datatype="id" />
2849                         <field name="name" reporter:datatype="text"/>
2850                         <field name="xpath" reporter:datatype="text"/>
2851                         <field name="format" reporter:datatype="link"/>
2852                         <field name="first_word" reporter:datatype="bool" />
2853                 </fields>
2854                 <links/>
2855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2856             <actions>
2857                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2858                 <retrieve/>
2859                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2860                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2861             </actions>
2862         </permacrud>
2863         </class>
2864         <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">
2865                 <fields oils_persist:primary="code" oils_persist:sequence="">
2866                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2867                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2868                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2869                 </fields>
2870                 <links/>
2871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2872             <actions>
2873                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2874                 <retrieve/>
2875                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2876                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2877             </actions>
2878         </permacrud>
2879         </class>
2880         <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">
2881                 <fields oils_persist:primary="code" oils_persist:sequence="">
2882                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2883                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2884                 </fields>
2885                 <links/>
2886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887             <actions>
2888                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2889                 <retrieve/>
2890                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2891                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2892             </actions>
2893         </permacrud>
2894         </class>
2895     <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">
2896         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2897             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2898             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2899             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2900             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2901         </fields>
2902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2903             <actions>
2904                 <retrieve/>
2905             </actions>
2906         </permacrud>
2907     </class>
2908         <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">
2909                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2910                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2911                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2912                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2913                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2914                 </fields>
2915                 <links>
2916                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2917                 </links>
2918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2919             <actions>
2920                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2921                 <retrieve/>
2922                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2923                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2924             </actions>
2925         </permacrud>
2926         </class>
2927         <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">
2928                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2929                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2930                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2931                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2932                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2933                 </fields>
2934                 <links>
2935                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2936                 </links>
2937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2938             <actions>
2939                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2940                 <retrieve/>
2941                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2942                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2943             </actions>
2944         </permacrud>
2945         </class>
2946         <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">
2947                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2948                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2949                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2950                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2951                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2952                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2953                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2954                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2955                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2956                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2957                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2958                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2960                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2961                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2962                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2963                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2964                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2965                 </fields>
2966                 <links>
2967                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2968                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2969                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2970                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2971                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2972                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2973                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2974                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2975                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2976                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2977                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2978                 </links>
2979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2980             <actions>
2981                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2982                 <retrieve/>
2983                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2984                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2985             </actions>
2986         </permacrud>
2987         </class>
2988         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2989                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2990                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2991                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2992                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2993                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2994                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2995                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2996                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2997                 </fields>
2998                 <links>
2999                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3000                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3001         </links>
3002         </class>
3003         <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">
3004                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3005                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3006                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3007                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3008                 </fields>
3009                 <links>
3010                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3011                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3012                 </links>
3013         </class>
3014         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3016                         <field name="id" reporter:datatype="id" />
3017                         <field name="value" oils_persist:i18n="true" />
3018                 </fields>
3019                 <links/>
3020         </class>
3021         <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">
3022                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3023                         <field name="balance_owed" reporter:datatype="money" />
3024                         <field name="total_owed" reporter:datatype="money" />
3025                         <field name="total_paid" reporter:datatype="money" />
3026                         <field name="usr" reporter:datatype="link"/>
3027                 </fields>
3028                 <links>
3029                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3030         </links>
3031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3032             <actions>
3033                 <retrieve permission="VIEW_USER">
3034                     <context link="usr" field="home_ou"/>
3035                 </retrieve>
3036             </actions>
3037         </permacrud>
3038         </class>
3039         <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">
3040                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3041                         <field name="collector" />
3042                         <field name="enter_time" reporter:datatype="timestamp"/>
3043                         <field name="id" reporter:datatype="id" />
3044                         <field name="location" reporter:datatype="link"/>
3045                         <field name="usr" reporter:datatype="link"/>
3046                 </fields>
3047                 <links>
3048                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3049                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3050                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3051                 </links>
3052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3053             <actions>
3054                 <create permission="money.collections_tracker.create" context_field="location"/>
3055                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3056                 <delete permission="money.collections_tracker.create" context_field="location"/>
3057             </actions>
3058         </permacrud>
3059         </class>
3060         <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">
3061                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3062                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3063                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3064                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3065                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3066                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3067                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3068                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3069                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3070                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3071                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3072                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3073                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3074                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3075                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3076                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3077                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3078                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3079                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3080                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3086                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3095                 </fields>
3096                 <links>
3097                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3098                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3099                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3100                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3101                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3102                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3103                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3104                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3105                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3106                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3107                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3108                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3109                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3110                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3111                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3112                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3113                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3114                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3115                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3116                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3117                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3118                 </links>
3119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3120             <actions>
3121                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3122                 <retrieve/>
3123                 <update permission="UPDATE_MARC" global_required="true"/>
3124                 <!-- 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. -->
3125                 <delete permission="DELETE_RECORD" global_required="true"/>
3126             </actions>
3127         </permacrud>
3128         </class>
3129         <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">
3130                 <fields oils_persist:primary="id">
3131                         <field name="dow_0_close" />
3132                         <field name="dow_0_open" />
3133                         <field name="dow_1_close" />
3134                         <field name="dow_1_open" />
3135                         <field name="dow_2_close" />
3136                         <field name="dow_2_open" />
3137                         <field name="dow_3_close" />
3138                         <field name="dow_3_open" />
3139                         <field name="dow_4_close" />
3140                         <field name="dow_4_open" />
3141                         <field name="dow_5_close" />
3142                         <field name="dow_5_open" />
3143                         <field name="dow_6_close" />
3144                         <field name="dow_6_open" />
3145                         <field name="id" reporter:datatype="id" />
3146                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3147                 </fields>
3148                 <links>
3149                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3150                 </links>
3151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3152             <actions>
3153                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3154                 <retrieve/>
3155                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3156                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3157             </actions>
3158         </permacrud>
3159         </class>
3160         <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">
3161                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3162                         <field name="id" reporter:datatype="id" />
3163                         <field name="record" reporter:datatype="link"/>
3164                         <field name="label" reporter:datatype="text"/>
3165                         <field name="label_sortkey" reporter:datatype="text"/>
3166                         <field name="deleted" reporter:datatype="bool"/>
3167                 </fields>
3168                 <links>
3169                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3170                 </links>
3171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3172             <actions>
3173                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3174                 <retrieve/>
3175                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3176                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3177             </actions>
3178         </permacrud>
3179         </class>
3180         <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">
3181                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3182                         <field name="id" reporter:datatype="id" />
3183                         <field name="target_copy" reporter:datatype="link" />
3184                         <field name="part" reporter:datatype="link"/>
3185                 </fields>
3186                 <links>
3187                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3188                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3189                 </links>
3190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3191             <actions>
3192                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3193                 <retrieve/>
3194                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3195                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3196             </actions>
3197         </permacrud>
3198         </class>
3199         <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">
3200                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3201                         <field name="close_end" reporter:datatype="timestamp" />
3202                         <field name="close_start" reporter:datatype="timestamp" />
3203                         <field name="id" reporter:datatype="id" />
3204                         <field name="org_unit" reporter:datatype="org_unit"/>
3205                         <field name="reason" reporter:datatype="text"/>
3206                 </fields>
3207                 <links>
3208                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3209                 </links>
3210         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3211             <actions>
3212                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3213                 <retrieve/>
3214                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3215                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3216             </actions>
3217         </permacrud>
3218         </class>
3219         <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">
3220                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3221                         <field name="extended" reporter:datatype="interval"/>
3222                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3223                         <field name="max_renewals" reporter:datatype="int" />
3224                         <field name="name" reporter:datatype="text"/>
3225                         <field name="normal" reporter:datatype="interval"/>
3226                         <field name="shrt" reporter:datatype="interval"/>
3227                 </fields>
3228                 <links>
3229                 </links>
3230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3231             <actions>
3232                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3233                 <retrieve/>
3234                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3235                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3236             </actions>
3237         </permacrud>
3238         </class>
3239
3240         <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">
3241                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3242                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3243                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3244             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3245                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3246             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3247                 </fields>
3248                 <links>
3249             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3250                 </links>
3251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3252             <actions>
3253                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3254                 <retrieve/>
3255                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3256                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3257             </actions>
3258                 </permacrud>
3259         </class>
3260
3261         <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">
3262                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3263                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3264                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3265                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3266             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3267                 </fields>
3268                 <links>
3269                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3270                 </links>
3271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3272             <actions>
3273                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3274                 <retrieve/>
3275                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3276                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3277             </actions>
3278                 </permacrud>
3279         </class>
3280
3281         <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">
3282                 <fields oils_persist:primary="id" oils_persist:sequence="">
3283                         <field name="balance_owed" reporter:datatype="money"/>
3284                         <field name="id" reporter:datatype="id" />
3285                         <field name="last_billing_note" reporter:datatype="text"/>
3286                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3287                         <field name="last_billing_type" reporter:datatype="text"/>
3288                         <field name="last_payment_note" reporter:datatype="text"/>
3289                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3290                         <field name="last_payment_type" reporter:datatype="text"/>
3291                         <field name="total_owed" reporter:datatype="money"/>
3292                         <field name="total_paid" reporter:datatype="money"/>
3293                         <field name="usr" reporter:datatype="link"/>
3294                         <field name="xact_finish" reporter:datatype="timestamp" />
3295                         <field name="xact_start" reporter:datatype="timestamp" />
3296                         <field name="xact_type" reporter:datatype="text"/>
3297                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3298                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3299                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3300                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3301                         <field name="billing_location" reporter:datatype="link"/>
3302                 </fields>
3303                 <links>
3304                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3305                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3306                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3307                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3308                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3309                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3310                 </links>
3311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3312                         <actions>
3313                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3314                                         <context link="usr" field="home_ou" />
3315                                 </retrieve>
3316                         </actions>
3317                 </permacrud>
3318         </class>
3319         <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">
3320                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3321                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3323                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3325                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3326                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3327                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3328                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3329                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3330                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3331                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3332                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3333                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3334                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3335                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3336                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3337                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3338                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3339                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3340                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3341                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3342                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3343                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3344                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3345                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3346                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3347                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3348                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3349                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3350                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3351                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3352                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3353                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3354                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3355                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3356                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3357                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3358                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3359                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3360                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3361                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3362                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3363                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3364                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3365                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3366                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3367                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3368                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3369                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3370                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3371                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3372                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3373                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3374                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3375                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3376                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3377                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3378                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3379                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3383                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3384                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3385                 </fields>
3386                 <links>
3387                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3388                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3389                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3390                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3391                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3392                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3393                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3394                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3395                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3396                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3397                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3398                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3399                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3400                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3401                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3402                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3403                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3404                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3405                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3406                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3407                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3408                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3409                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3410                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3411                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3412                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3413                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3414                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3415                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3416                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3417                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3418                 </links>
3419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3420                         <actions>
3421                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3422                         </actions>
3423                 </permacrud>
3424         </class>
3425         <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">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3427                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3428                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3429                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3430                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3431                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3432                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3433                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3434                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3435         </fields>
3436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3437                         <actions>
3438                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3439                                 <retrieve/>
3440                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3441                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3442                         </actions>
3443                 </permacrud>
3444         </class>
3445         <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">
3446                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3447                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3448                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3449                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3450                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3451         </fields>
3452         <links>
3453                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3454                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3455                 </links>
3456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3457                         <actions>
3458                                 <retrieve permission="RUN_REPORTS">
3459                                         <context link="usr" field="home_ou" />
3460                                 </retrieve>
3461                         </actions>
3462                 </permacrud>
3463         </class>
3464         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3466                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3467                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3468                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3469                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3470                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3471                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3472         </fields>
3473         <links>
3474                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3475                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3476                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3477                 </links>
3478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3479                         <actions>
3480                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3481                                         <context link="usr" field="home_ou" />
3482                                         <context link="ws" field="owning_lib" />
3483                                 </retrieve>
3484                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3485                                         <context link="usr" field="home_ou" />
3486                                         <context link="ws" field="owning_lib" />
3487                                 </create>
3488                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3489                                         <context link="usr" field="home_ou" />
3490                                         <context link="ws" field="owning_lib" />
3491                                 </update>
3492                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3493                                         <context link="usr" field="home_ou" />
3494                                         <context link="ws" field="owning_lib" />
3495                                 </delete>
3496                         </actions>
3497                 </permacrud>
3498         </class>
3499         <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">
3500                 <fields oils_persist:primary="name">
3501                         <field name="name" reporter:datatype="text"/>
3502                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3503                 </fields>
3504                 <links/>
3505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3506                         <actions>
3507                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3508                                 <retrieve/>
3509                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3510                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3511                         </actions>
3512                 </permacrud>
3513         </class>
3514         <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">
3515                 <fields oils_persist:primary="name">
3516                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3517                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3518                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3519                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3520                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3521                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3522                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3523                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3524                 </fields>
3525                 <links>
3526                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3527                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3528                 </links>
3529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3530                         <actions>
3531                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3532                                 <retrieve/>
3533                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3534                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3535                         </actions>
3536                 </permacrud>
3537         </class>
3538         <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">
3539                 <fields oils_persist:primary="name">
3540                         <field name="name" reporter:datatype="text"/>
3541                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3542                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3543                         <field name="datatype" reporter:datatype="text"/>
3544                         <field name="view_perm" reporter:datatype="link"/>
3545                         <field name="update_perm" reporter:datatype="link"/>
3546                         <field name="fm_class" reporter:datatype="text"/>
3547                         <field name="grp" reporter:datatype="link"/>
3548                 </fields>
3549                 <links>
3550                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3551                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3552                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3553                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3554                 </links>
3555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3556                         <actions>
3557                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3558                                 <retrieve/>
3559                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3560                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3561                         </actions>
3562                 </permacrud>
3563         </class>
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3566                         <field name="id" />
3567                         <field name="name"  reporter:datatype="text"/>
3568                         <field name="org_unit" reporter:datatype="org_unit"/>
3569                         <field name="value"  reporter:datatype="text"/>
3570                 </fields>
3571                 <links>
3572                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3573                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3574                 </links>
3575         </class>
3576         <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">
3577                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3578                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3579                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3580                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3581                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3582                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3583                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3584                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3585                 </fields>
3586                 <links>
3587                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3588                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3589                 </links>
3590         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3591             <actions>
3592                 <create permission="CREATE_COPY_NOTE">
3593                     <context link="owning_copy" field="circ_lib"/>
3594                 </create>
3595                 <retrieve permission="VIEW_COPY_NOTES">
3596                     <context link="owning_copy" field="circ_lib"/>
3597                 </retrieve>
3598                 <update permission="UPDATE_COPY_NOTE">
3599                     <context link="owning_copy" field="circ_lib"/>
3600                 </update>
3601                 <delete permission="DELETE_COPY_NOTE">
3602                     <context link="owning_copy" field="circ_lib"/>
3603                 </delete>
3604             </actions>
3605         </permacrud>
3606         </class>
3607         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3608                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3609                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3610                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3611                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3612                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3613                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3614                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3615                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3616                 </fields>
3617                 <links>
3618                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3619                 </links>
3620         </class>
3621         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3622                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3623                         <field name="fingerprint"  reporter:datatype="text"/>
3624                         <field name="id" reporter:datatype="id" />
3625                         <field name="master_record" reporter:datatype="link"/>
3626                         <field name="mods"  reporter:datatype="text"/>
3627                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3628                 </fields>
3629                 <links>
3630                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3631                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3632                 </links>
3633         </class>
3634         <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">
3635                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3636                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3637                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3638                 </fields>
3639                 <links/>
3640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3641             <actions>
3642                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3643                 <retrieve/>
3644                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3645                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3646             </actions>
3647         </permacrud>
3648         </class>
3649         <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">
3650                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3651                         <field name="code"  reporter:datatype="text"/>
3652                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3653                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3654                 </fields>
3655                 <links/>
3656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3657             <actions>
3658                 <create permission="CREATE_PERM" global_required="true"/>
3659                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3660                 <update permission="UPDATE_PERM" global_required="true"/>
3661                 <delete permission="DELETE_PERM" global_required="true"/>
3662             </actions>
3663         </permacrud>
3664         </class>
3665         <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">
3666                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3667                         <field name="id" reporter:datatype="id" />
3668                         <field name="metarecord" reporter:datatype="link"/>
3669                         <field name="source" reporter:datatype="link"/>
3670                 </fields>
3671                 <links>
3672                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3673                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3674                 </links>
3675         </class>
3676         <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">
3677                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3678                         <field name="id" reporter:datatype="id" />
3679                         <field name="field" reporter:datatype="link"/>
3680                         <field name="source" reporter:datatype="link"/>
3681                         <field name="value"  reporter:datatype="text"/>
3682                 </fields>
3683                 <links>
3684                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3685                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3686                 </links>
3687         </class>
3688         <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">
3689                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3690                         <field name="id" reporter:datatype="id" />
3691                         <field name="value" reporter:datatype="text"/>
3692                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3693                 </fields>
3694                 <links>
3695                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3696                 </links>
3697         </class>
3698         <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">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3700                         <field name="id" reporter:datatype="id" />
3701                         <field name="entry" reporter:datatype="link"/>
3702                         <field name="def" reporter:datatype="link"/>
3703                         <field name="source" reporter:datatype="link"/>
3704                 </fields>
3705                 <links>
3706                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3707                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3708                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3709                 </links>
3710         </class>
3711         <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">
3712                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3713                         <field name="id" reporter:datatype="id" />
3714                         <field name="entry" reporter:datatype="link"/>
3715                         <field name="simple_heading" reporter:datatype="link"/>
3716                 </fields>
3717                 <links>
3718                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3719                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3720                 </links>
3721         </class>
3722         <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">
3723                 <oils_persist:source_definition>
3724                         SELECT * FROM metabib.author_field_entry
3725                                                 UNION ALL
3726                         SELECT * FROM metabib.keyword_field_entry
3727                                                 UNION ALL
3728                         SELECT * FROM metabib.identifier_field_entry
3729                                                 UNION ALL
3730                         SELECT * FROM metabib.title_field_entry
3731                                                 UNION ALL
3732                         SELECT * FROM metabib.subject_field_entry
3733                                                 UNION ALL
3734                         SELECT * FROM metabib.series_field_entry
3735                 </oils_persist:source_definition>
3736                 <fields>
3737                         <field name="field" reporter:datatype="link"/>
3738                         <field name="id" reporter:datatype="id" />
3739                         <field name="source" reporter:datatype="link"/>
3740                         <field name="value"  reporter:datatype="text"/>
3741                 </fields>
3742                 <links>
3743                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3744                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3745                 </links>
3746         </class>
3747         <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">
3748                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3749                         <field name="field" reporter:datatype="link"/>
3750                         <field name="id" reporter:datatype="id" />
3751                         <field name="source" reporter:datatype="link"/>
3752                         <field name="value"  reporter:datatype="text"/>
3753                 </fields>
3754                 <links>
3755                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3756                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3757                 </links>
3758         </class>
3759         <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">
3760                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3761                         <field name="accepting_usr" reporter:datatype="link"/>
3762                         <field name="amount" reporter:datatype="money" />
3763                         <field name="amount_collected" reporter:datatype="money" />
3764                         <field name="cash_drawer" reporter:datatype="link"/>
3765                         <field name="id" reporter:datatype="id" />
3766                         <field name="note"  reporter:datatype="text"/>
3767                         <field name="payment_ts" reporter:datatype="timestamp"/>
3768                         <field name="xact" reporter:datatype="link"/>
3769                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3770                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3771                 </fields>
3772                 <links>
3773                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3774                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3775                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3776                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3777                 </links>
3778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3779             <actions>
3780                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3781                     <context link="xact" jump="usr" field="home_ou"/>
3782                 </retrieve>
3783                         </actions>
3784                 </permacrud>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3788                         <field name="accepting_usr" reporter:datatype="link"/>
3789                         <field name="amount" reporter:datatype="money" />
3790                         <field name="amount_collected" reporter:datatype="money" />
3791                         <field name="id" reporter:datatype="id" />
3792                         <field name="note"  reporter:datatype="text"/>
3793                         <field name="payment_ts" reporter:datatype="timestamp"/>
3794                         <field name="xact" reporter:datatype="link"/>
3795                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3796                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3797                 </fields>
3798                 <links>
3799                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3800                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3801                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3802                 </links>
3803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3804             <actions>
3805                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3806                     <context link="xact" jump="usr" field="home_ou"/>
3807                 </retrieve>
3808                         </actions>
3809                 </permacrud>
3810         </class>
3811         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3812                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3813                         <field name="accepting_usr" reporter:datatype="link"/>
3814                         <field name="amount" reporter:datatype="money" />
3815                         <field name="amount_collected" reporter:datatype="money" />
3816                         <field name="id" reporter:datatype="id" />
3817                         <field name="note"  reporter:datatype="text"/>
3818                         <field name="payment_ts" reporter:datatype="timestamp"/>
3819                         <field name="xact" reporter:datatype="link"/>
3820                         <field name="billing" reporter:datatype="link"/>
3821                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3822                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3823                 </fields>
3824                 <links>
3825                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3826                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3827                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3828                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3829                 </links>
3830         </class>
3831         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3832                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3833                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3834                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3835                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3836                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3837                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3838                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3839                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3840                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3841                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3842                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3843                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3844                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3845                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3846                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3847                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3848                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3849                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3850                 </fields>
3851                 <links>
3852                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3853                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3854                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3855                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3856                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3857                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3858                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3859                 </links>
3860         </class>
3861
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3864                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3865                         <field name="name"  reporter:datatype="text"/>
3866                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3867                         <field name="block_list" reporter:datatype="text"/>
3868                         <field name="staff_alert" reporter:datatype="bool"/>
3869                         <field name="org_depth" reporter:datatype="int"/>
3870                         <field name="ignore_proximity" reporter:datatype="int"/>
3871                 </fields>
3872                 <links/>
3873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3874             <actions>
3875                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3876                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3877                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3878                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3879             </actions>
3880         </permacrud>
3881         </class>
3882         <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">
3883                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3884                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3885                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3886                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3887                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3888                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3889                 </fields>
3890                 <links>
3891                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3892                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3893                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3894         </links>
3895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3896             <actions>
3897                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3898                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3899                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3900                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3901             </actions>
3902         </permacrud>
3903         </class>
3904         <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">
3905                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3906                         <field name="holdable" reporter:datatype="bool"/>
3907                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3908                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3909                         <field name="opac_visible" reporter:datatype="bool"/>
3910             <field name="copy_active" reporter:datatype="bool"/>
3911             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3912             <field name="is_available" reporter:datatype="bool"/>
3913                 </fields>
3914                 <links/>
3915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3916             <actions>
3917                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3918                 <retrieve/>
3919                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3920                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3921             </actions>
3922         </permacrud>
3923         </class>
3924         <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">
3925                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3926                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3927                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3928                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3929                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3930                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3931                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3932                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3933                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3934                 </fields>
3935                 <links>
3936                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3937                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3938                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3939                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3940                 </links>
3941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3942                         <actions>
3943                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3944                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3945                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3946                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3947                         </actions>
3948                 </permacrud>
3949         </class>
3950         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3951                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3952                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3953                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3954                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3955                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3956                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3957                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3958                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3959                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3960                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3961                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3962                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3963                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3964                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3965                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3966                 </fields>
3967                 <links>
3968                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3969                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3970                 </links>
3971         </class>
3972         <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">
3973                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3974                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3975                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3976                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3977                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3978                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3979                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3980                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3981                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3982                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3983                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3984                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3985                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3986                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3987                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3988                 </fields>
3989                 <links>
3990                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3991                 </links>
3992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3993                         <actions>
3994                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3995                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3996                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3997                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3998                         </actions>
3999                 </permacrud>
4000         </class>
4001
4002
4003         <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">
4004                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4005                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4006                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4007                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4008                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4009                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4010                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4011                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4012                 </fields>
4013                 <links>
4014                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4015                 </links>
4016         </class>
4017
4018         <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">
4019                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4020                         <field name="call_number" />
4021                         <field name="create_date" reporter:datatype="timestamp"/>
4022                         <field name="creator" reporter:datatype="link"/>
4023                         <field name="id" reporter:datatype="id" />
4024                         <field name="pub" reporter:datatype="bool"/>
4025                         <field name="title"  reporter:datatype="text"/>
4026                         <field name="value"  reporter:datatype="text"/>
4027                 </fields>
4028                 <links>
4029                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4030                 </links>
4031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4032             <actions>
4033                 <create permission="CREATE_VOLUME_NOTE">
4034                     <context link="call_number" field="owning_lib"/>
4035                 </create>
4036                 <retrieve permission="VIEW_VOLUME_NOTES">
4037                     <context link="call_number" field="owning_lib"/>
4038                 </retrieve>
4039                 <update permission="UPDATE_VOLUME_NOTE">
4040                     <context link="call_number" field="owning_lib"/>
4041                 </update>
4042                 <delete permission="DELETE_VOLUME_NOTE">
4043                     <context link="call_number" field="owning_lib"/>
4044                 </delete>
4045             </actions>
4046         </permacrud>
4047         </class>
4048         <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">
4049                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4050                         <field name="create_date" reporter:datatype="timestamp"/>
4051                         <field name="creator" reporter:datatype="link"/>
4052                         <field name="edit_date" reporter:datatype="timestamp"/>
4053                         <field name="editor" reporter:datatype="link"/>
4054                         <field name="id" reporter:datatype="id" />
4055                         <field name="record" reporter:datatype="link"/>
4056                         <field name="value" reporter:datatype="text"/>
4057                 </fields>
4058                 <links>
4059                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4060                 </links>
4061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4062             <actions>
4063                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4064                 <retrieve/>
4065                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4066                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4067             </actions>
4068         </permacrud>
4069         </class>
4070         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4071         <oils_persist:source_definition>
4072 SELECT  usr,
4073         SUM(
4074             CASE
4075                 WHEN (
4076                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4077                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4078                 ) THEN 1
4079                 ELSE 0
4080             END
4081         ) AS out,
4082
4083         SUM(
4084             CASE
4085                 WHEN (
4086                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4087                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4088                 ) THEN 1
4089                 ELSE 0
4090             END
4091         ) AS overdue,
4092
4093         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4094         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4095         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4096   FROM  action.circulation
4097   WHERE checkin_time IS NULL
4098   GROUP BY 1
4099         </oils_persist:source_definition>
4100         <fields oils_persist:primary="usr">
4101             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4102             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4103             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4104             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4105             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4106             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4107         </fields>
4108         <links>
4109             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4110         </links>
4111         </class>
4112         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4113         <oils_persist:source_definition>
4114 SELECT  usr,
4115         STRING_AGG(
4116             CASE
4117                 WHEN (
4118                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4119                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4120                 ) THEN id::TEXT
4121                 ELSE '0'
4122             END
4123         ,',') AS out,
4124
4125         STRING_AGG(
4126             CASE
4127                 WHEN (
4128                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4129                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4130                 ) THEN id::TEXT
4131                 ELSE '0'
4132             END
4133         ,',') AS overdue,
4134
4135         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4136         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4137         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4138   FROM  action.circulation
4139   WHERE checkin_time IS NULL
4140   GROUP BY 1
4141         </oils_persist:source_definition>
4142         <fields oils_persist:primary="usr">
4143             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4144             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4145             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4146             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4147             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4148             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4149         </fields>
4150         <links>
4151             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4152         </links>
4153         </class>
4154         <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">
4155                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4156                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4157                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4158                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4159                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4160                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4161                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4162                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4163                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4164                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4165                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4166                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4167                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4168                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4169                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4170                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4171                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4172                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4173                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4174                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4175                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4176                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4177                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4178                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4179                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4180                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4181                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4182                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4183                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4184                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4185                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4186                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4187                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4188                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4189                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4190                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4191                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4192                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4193                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4194                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4195                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4196                 </fields>
4197                 <links>
4198                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4199                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4200                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4201                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4202                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4204                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4205                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4206                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4207                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4208                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4209                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4210                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4211                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4212                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4213                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4214                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4215                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4216                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4217                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4218                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4219                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4220                 </links>
4221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4222                         <actions>
4223                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4224                         </actions>
4225                 </permacrud>
4226         </class>
4227         <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">
4228                 <fields>
4229                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4230                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4231                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4232                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4233                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4234                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4235                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4236                 </fields>
4237                 <links>
4238                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4239                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4240                 </links>
4241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4242                         <actions>
4243                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4244                         </actions>
4245                 </permacrud>
4246         </class>
4247         <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">
4248                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4249                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4250                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4251                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4252                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4253                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4254                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4255                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4256                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4257                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4258                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4259                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4260                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4261                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4262                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4263                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4264                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4265                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4266                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4267                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4268                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4269                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4270                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4271                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4272                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4273                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4274                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4275                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4276                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4277                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4278                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4279                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4280                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4281                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4282                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4283                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4284                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4285                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4286                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4287                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4288                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4289                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4290                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4291                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4292                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4293                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4294                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4295                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4296                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4297                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4298                 </fields>
4299                 <links>
4300                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4301                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4302                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4303                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4304                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4305                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4306                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4307                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4308                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4309                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4310                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4311                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4312                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4313                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4314                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4315                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4316                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4317                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4318                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4319                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4320                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4321                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4322                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4323                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4324                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4325                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4326                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4327                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4328                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4329                 </links>
4330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4331                         <actions>
4332                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4333                         </actions>
4334                 </permacrud>
4335         </class>
4336         <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">
4337                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4338                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4339                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4340                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4341                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4342                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4343                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4344                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4345                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4346                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4347                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4348                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4349                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4350                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4351                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4352                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4353                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4354                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4355                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4356                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4357                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4358                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4359                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4360                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4361                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4362                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4363                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4364                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4365                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4366                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4367                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4368                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4369                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4370                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4371                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4372                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4373                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4374                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4375                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4376                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4377                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4378                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4379                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4380                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4381                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4382                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4383                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4384                 </fields>
4385                 <links>
4386                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4387                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4388                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4389                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4390                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4391                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4392                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4393                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4394                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4395                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4396                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4397                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4398                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4399                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4400                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4401                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4402                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4403                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4404                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4405                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4406                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4407                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4408                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4409                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4410                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4411                 </links>
4412         </class>
4413         <class id="auch" 
4414                 controller="open-ils.cstore" 
4415                 oils_obj:fieldmapper="action::user_circ_history" 
4416                 oils_persist:tablename="action.usr_circ_history" 
4417                 reporter:label="User Checkout History">
4418                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4419                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4420                         <!-- prevent reporting on the user that owns the checkout history -->
4421                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4422                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4423                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4424                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4425                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4426                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4427                 </fields>
4428                 <links>
4429                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4430                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4431                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4432                 </links>
4433         </class>
4434         <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">
4435                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4436                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4437                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4438                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4439                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4440                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4441                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4442                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4443                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4444                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4445                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4446                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4447                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4448                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4449                 </fields>
4450                 <links>
4451                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4452                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4453                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4454                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4455                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4456                 </links>
4457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4458                         <actions>
4459                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4460                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4461                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4462                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4463                         </actions>
4464                 </permacrud>
4465         </class>
4466
4467         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4468                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4469                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4470                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4471                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4472                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4473                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4474                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4475                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4476                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4477                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4478                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4479                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4480                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4481                 </fields>
4482                 <links>
4483                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4484                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4485                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4486                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4487                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4488                 </links>
4489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4490                         <actions>
4491                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4492                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4493                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4494                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4495                         </actions>
4496                 </permacrud>
4497         </class>
4498         
4499         <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">
4500                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4501                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4502                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4503                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4504                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4505                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4506                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4507                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4508                 </fields>
4509                 <links>
4510                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4511                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4512                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4513                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4514                 </links>
4515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4516                         <actions>
4517                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4518                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4519                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4520                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4521                         </actions>
4522                 </permacrud>
4523         </class>
4524         
4525         <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">
4526                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4527                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4528                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4529                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4530                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4531                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4532                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4533                 </fields>
4534                 <links>
4535                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4536                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4537                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4538                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4539                 </links>
4540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4541                         <actions>
4542                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4543                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4544                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4545                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4546                         </actions>
4547                 </permacrud>
4548         </class>
4549         
4550         <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">
4551                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4552                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4553                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4554                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4555                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4556                 </fields>
4557                 <links>
4558                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4559                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4560                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4561                 </links>
4562                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4563                         <actions>
4564                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4565                     <context link="resource" field="owner" />
4566                 </create>
4567                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4568                     <context link="resource" field="owner" />
4569                 </retrieve>
4570                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4571                     <context link="resource" field="owner" />
4572                 </update>
4573                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4574                     <context link="resource" field="owner" />
4575                 </delete>
4576                         </actions>
4577                 </permacrud>
4578         </class>
4579         
4580         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4581                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4582                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4583                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4584                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4585                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4586                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4587                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4588                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4589                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4590                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4591                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4592                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4593                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4594                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4595                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4596                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4597                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4598                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4599                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4600                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4601                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4602                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4603                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4604                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4605                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4606                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4607                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4608                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4609                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4610                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4611                 </fields>
4612                 <links>
4613                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4614                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4615                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4616                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4617                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4618                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4619                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4620                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4621                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4622                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4623                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4624                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4625                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4626                 </links>
4627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4628                         <actions>
4629                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4630                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4631                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4632                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4633                         </actions>
4634                 </permacrud>
4635         </class>
4636         
4637         <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">
4638                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4639                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4640                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4641                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4642                 </fields>
4643                 <links>
4644                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4645                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4646                 </links>
4647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4648                         <actions>
4649                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4650                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4651                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4652                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4653                         </actions>
4654                 </permacrud>
4655         </class>
4656
4657         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
4658                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4659                         <field name="bucket" reporter:datatype="link"/>
4660                         <field name="id" reporter:datatype="id" />
4661                         <field name="target_call_number" reporter:datatype="link" />
4662                         <field name="create_time" reporter:datatype="timestamp" />
4663                         <field name="pos" reporter:datatype="int" />
4664                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4665                 </fields>
4666                 <links>
4667                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4668                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4669             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4670                 </links>
4671         </class>
4672         <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">
4673                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4674                         <field name="id" reporter:datatype="id" />
4675                         <field name="item" reporter:datatype="link"/>
4676                         <field name="note" reporter:datatype="text" />
4677                 </fields>
4678                 <links>
4679                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4680                 </links>
4681         </class>
4682         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4683                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4684                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4685                         <field name="btype" reporter:datatype="text"/>
4686                         <field name="id" reporter:datatype="id" />
4687                         <field name="name" reporter:datatype="text"/>
4688                         <field name="description" reporter:datatype="text"/>
4689                         <field name="owner" reporter:datatype="link"/>
4690                         <field name="pub" reporter:datatype="bool"/>
4691                         <field name="create_time" reporter:datatype="timestamp" />
4692                 </fields>
4693                 <links>
4694                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4695                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4696                 </links>
4697         </class>
4698         <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">
4699                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4700                         <field name="id" reporter:datatype="id" />
4701                         <field name="bucket" reporter:datatype="link"/>
4702                         <field name="note" reporter:datatype="text" />
4703                 </fields>
4704                 <links>
4705                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4706                 </links>
4707         </class>
4708         <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">
4709                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4710                         <field name="hold" reporter:datatype="link"/>
4711                         <field name="id" reporter:datatype="id" />
4712                         <field name="target_copy" reporter:datatype="link"/>
4713                         <field name="proximity" reporter:datatype="number"/>
4714                 </fields>
4715                 <links>
4716                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4717                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4718                 </links>
4719         </class>
4720         <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">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4722                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4723                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4724                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4725                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4726                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4727                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4728                 </fields>
4729                 <links>
4730                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4731                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4732                 </links>
4733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4734             <actions>
4735                 <create permission="CREATE_HOLD_NOTIFICATION">
4736                                         <context link="hold" jump="usr" field="home_ou" />
4737                                 </create>
4738                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4739                                         <context link="hold" jump="usr" field="home_ou" />
4740                                 </retrieve>
4741                 <update permission="CREATE_HOLD_NOTIFICATION">
4742                                         <context link="hold" jump="usr" field="home_ou" />
4743                                 </update>
4744                 <delete permission="CREATE_HOLD_NOTIFICATION">
4745                                         <context link="hold" jump="usr" field="home_ou" />
4746                                 </delete>
4747             </actions>
4748         </permacrud>
4749         </class>
4750         <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">
4751                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4752                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4753                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4754                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4755                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4756                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4757                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4758                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4759                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4760                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4762                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4763                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4764                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4765                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4766                 </fields>
4767                 <links>
4768                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4769                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4770                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4771                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4772                 </links>
4773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4774             <actions>
4775                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4776                 <retrieve/>
4777                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4778                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4779             </actions>
4780         </permacrud>
4781         </class>
4782         <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">
4783                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4784                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4785                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4786                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4787                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4788             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4789             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4790             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4791                 </fields>
4792                 <links>
4793                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4794                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4795                 </links>
4796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4797             <actions>
4798                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4799                 <retrieve/>
4800                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4801                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4802             </actions>
4803         </permacrud>
4804         </class>
4805         <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">
4806                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4807                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4808             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4809             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4810                 </fields>
4811                 <links>
4812                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4813                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4814                 </links>
4815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4816             <actions>
4817                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4818                                         <context link="lgroup" field="owner" />
4819                 </create>
4820                 <retrieve/>
4821                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4822                                         <context link="lgroup" field="owner" />
4823                 </update>
4824                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4825                                         <context link="lgroup" field="owner" />
4826                 </delete>
4827             </actions>
4828         </permacrud>
4829         </class>
4830
4831     <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">
4832         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4833             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4834             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4835             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4836             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4837         </fields>
4838         <links>
4839             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4840             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4841         </links>
4842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4843             <actions>
4844                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4845                 <retrieve/>
4846                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4847                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4848             </actions>
4849         </permacrud>
4850     </class>
4851
4852         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4853                 <fields>
4854                         <field name="sre_id" oils_persist:virtual="true" />
4855                         <field name="location" oils_persist:virtual="true" />
4856                         <field name="owning_lib" oils_persist:virtual="true" />
4857                         <field name="basic_holdings" oils_persist:virtual="true" />
4858                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4859                         <field name="supplement_holdings" oils_persist:virtual="true" />
4860                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4861                         <field name="index_holdings" oils_persist:virtual="true" />
4862                         <field name="index_holdings_add" oils_persist:virtual="true" />
4863                         <field name="online" oils_persist:virtual="true" />
4864                         <field name="missing" oils_persist:virtual="true" />
4865                         <field name="incomplete" oils_persist:virtual="true" />
4866                 </fields>
4867         </class>
4868
4869         <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">
4870                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4871                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4872                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4873                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4874                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4875                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4876                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4877                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4878                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4879                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4880                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4881                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4882                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4883                 </fields>
4884                 <links>
4885                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4886                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4887                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4888                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4889                 </links>
4890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4891                         <actions>
4892                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4893                                 <retrieve/>
4894                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4895                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4896                         </actions>
4897                 </permacrud>
4898         </class>
4899
4900         <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">
4901                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4902                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4903                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4904                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4905                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4906                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4907                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4908                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4909                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4910                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4911                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4912                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4913                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4914                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4915                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4916                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4917                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4918                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4919                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4920                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4921                 </fields>
4922                 <links>
4923                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4924                 </links>
4925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4926                         <actions>
4927                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4928                                         <context link="subscription" field="owning_lib" />
4929                                 </create>
4930                                 <retrieve />
4931                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4932                                         <context link="subscription" field="owning_lib" />
4933                                 </update>
4934                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4935                                         <context link="subscription" field="owning_lib" />
4936                                 </delete>
4937                         </actions>
4938                 </permacrud>
4939         </class>
4940
4941         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4942                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4943                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4944                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4945                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4946                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4947                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4948                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4949                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4950                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4951                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4952                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4953                 </fields>
4954                 <links>
4955                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4956                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4957                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4958                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4959                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4960                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4961                 </links>
4962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4963                         <actions>
4964                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4965                                 <retrieve />
4966                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4967                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4968                         </actions>
4969                 </permacrud>
4970         </class>
4971
4972         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4973                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4974                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4975                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4976                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4977                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4978                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4979                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4980                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4981                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4982                 </fields>
4983                 <links>
4984                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4985                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4986                 </links>
4987         </class>
4988
4989         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4990                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4991                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4992                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4993                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4994                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4995                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4996                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4997                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4998                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4999                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5000                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5001                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5002                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5003                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5004                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5005                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5006                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5007                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5008                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5009                 </fields>
5010                 <links>
5011                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5012                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5013                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5014                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5015                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5016                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5017                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5018                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5019                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5020                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5021                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5022                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5023                 </links>
5024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5025                         <actions>
5026                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5027                                 <retrieve />
5028                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5029                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5030                         </actions>
5031                 </permacrud>
5032         </class>
5033
5034         <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">
5035                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5036                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5037                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5038                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5039                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5040                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5041                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5042                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5043                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5044                 </fields>
5045                 <links>
5046                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5047                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5048                 </links>
5049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5050                         <actions>
5051                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5052                                         <context link="distribution" field="holding_lib" />
5053                                 </create>
5054                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5055                                         <context link="distribution" field="holding_lib" />
5056                                 </retrieve>
5057                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5058                                         <context link="distribution" field="holding_lib" />
5059                                 </update>
5060                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5061                                         <context link="distribution" field="holding_lib" />
5062                                 </delete>
5063                         </actions>
5064                 </permacrud>
5065         </class>
5066
5067         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5068                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5069                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5070                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5071                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5072                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5073                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5074                 </fields>
5075                 <links>
5076                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5077                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5078                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5079                 </links>
5080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5081                         <actions>
5082                                 <create permission="ADMIN_SERIAL_STREAM">
5083                                         <context link="distribution" field="holding_lib" />
5084                                 </create>
5085                                 <retrieve />
5086                                 <update permission="ADMIN_SERIAL_STREAM">
5087                                         <context link="distribution" field="holding_lib" />
5088                                 </update>
5089                                 <delete permission="ADMIN_SERIAL_STREAM">
5090                                         <context link="distribution" field="holding_lib" />
5091                                 </delete>
5092                         </actions>
5093                 </permacrud>
5094         </class>
5095
5096         <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">
5097                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5098                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5099                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5100                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5101                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5102                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5103                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5104                 </fields>
5105                 <links>
5106                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5107                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5108                 </links>
5109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5110                         <actions>
5111                                 <create permission="ADMIN_SERIAL_STREAM">
5112                                         <context link="stream" jump="distribution" field="holding_lib" />
5113                                 </create>
5114                                 <retrieve permission="RECEIVE_SERIAL">
5115                                         <context link="stream" jump="distribution" field="holding_lib" />
5116                                 </retrieve>
5117                                 <update permission="ADMIN_SERIAL_STREAM">
5118                                         <context link="stream" jump="distribution" field="holding_lib" />
5119                                 </update>
5120                                 <delete permission="ADMIN_SERIAL_STREAM">
5121                                         <context link="stream" jump="distribution" field="holding_lib" />
5122                                 </delete>
5123                         </actions>
5124                 </permacrud>
5125         </class>
5126
5127         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5128                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5129                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5130                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5131                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5132                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5133                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5134                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5135                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5136                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5137                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5138                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5139                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5140                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5141                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5142                 </fields>
5143                 <links>
5144                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5145                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5146                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5147                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5148                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5149                 </links>
5150                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5151                         <actions>
5152                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5153                                         <context link="subscription" field="owning_lib" />
5154                                 </create>
5155                                 <retrieve/>
5156                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5157                                         <context link="subscription" field="owning_lib" />
5158                                 </update>
5159                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5160                                         <context link="subscription" field="owning_lib" />
5161                                 </delete>
5162                         </actions>
5163                 </permacrud>
5164         </class>
5165
5166         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5167                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5168                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5169                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5170                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5171                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5172                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5173                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5174                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5175                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5176                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5177                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5178                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5180                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5181                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5182                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5183                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5184                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5185                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5186                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5187                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5188                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5189                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5190                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5191                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5192                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5193                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5194                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5195                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5196                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5197                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5198                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5199                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5200                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5201                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5202                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5203                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5204                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5205                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5206                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5207                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5208                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5209                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5210                 </fields>
5211                 <links>
5212                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5213                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5214                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5215                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5216                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5217                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5218                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5219                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5220                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5221                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5222                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5223                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5224                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5225                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5226                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5227                 </links>
5228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5229                         <actions>
5230                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5231                                 <retrieve/>
5232                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5233                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5234                         </actions>
5235                 </permacrud>
5236         </class>
5237
5238         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5239                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5240                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5241                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5242                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5243                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5244                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5245                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5246                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5247                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5248                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5249                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5250                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5251                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5252                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5253                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5254                 </fields>
5255                 <links>
5256                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5257                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5258                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5259                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5260                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5261                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5262                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5263                 </links>
5264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5265                         <actions>
5266                                 <create permission="ADMIN_SERIAL_ITEM">
5267                                         <context link="stream" jump="distribution" field="holding_lib" />
5268                                 </create>
5269                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5270                                         <context link="stream" jump="distribution" field="holding_lib" />
5271                                 </retrieve>
5272                                 <update permission="ADMIN_SERIAL_ITEM">
5273                                         <context link="stream" jump="distribution" field="holding_lib" />
5274                                 </update>
5275                                 <delete permission="ADMIN_SERIAL_ITEM">
5276                                         <context link="stream" jump="distribution" field="holding_lib" />
5277                                 </delete>
5278                         </actions>
5279                 </permacrud>
5280         </class>
5281
5282         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5283                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5284                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5285                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5286                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5287                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5288                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5289                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5290                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5291                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5292                 </fields>
5293                 <links>
5294                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5295                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5296                 </links>
5297                 <!-- Not available via PCRUD at this time -->
5298         </class>
5299         <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">
5300                 <fields>
5301                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5302                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5303                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5304                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5305                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5306                 </fields>
5307                 <links>
5308                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5309                 </links>
5310         </class>
5311         <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">
5312                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5313                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5314                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5315                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5316                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5317                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5318                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5319                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5320                 </fields>
5321                 <links>
5322                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5323                 </links>
5324         </class>
5325         <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">
5326                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5327                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5328                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5329                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5330                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5331                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5332                 </fields>
5333                 <links>
5334                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5335                 </links>
5336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5337                         <actions>
5338                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5339                                         <context link="distribution" field="holding_lib" />
5340                                 </create>
5341                                 <retrieve/>
5342                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5343                                         <context link="distribution" field="holding_lib" />
5344                                 </update>
5345                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5346                                         <context link="distribution" field="holding_lib" />
5347                                 </delete>
5348                         </actions>
5349                 </permacrud>
5350         </class>
5351
5352         <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">
5353                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5354                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5355                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5356                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5357                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5358                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5359                 </fields>
5360                 <links>
5361                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5362                 </links>
5363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5364                         <actions>
5365                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5366                                         <context link="distribution" field="holding_lib" />
5367                                 </create>
5368                                 <retrieve/>
5369                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5370                                         <context link="distribution" field="holding_lib" />
5371                                 </update>
5372                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5373                                         <context link="distribution" field="holding_lib" />
5374                                 </delete>
5375                         </actions>
5376                 </permacrud>
5377         </class>
5378
5379         <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">
5380                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5381                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5382                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5383                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5384                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5385                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5386                 </fields>
5387                 <links>
5388                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5389                 </links>
5390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5391                         <actions>
5392                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5393                                         <context link="distribution" field="holding_lib" />
5394                                 </create>
5395                                 <retrieve/>
5396                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5397                                         <context link="distribution" field="holding_lib" />
5398                                 </update>
5399                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5400                                         <context link="distribution" field="holding_lib" />
5401                                 </delete>
5402                         </actions>
5403                 </permacrud>
5404         </class>
5405
5406         <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">
5407                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5408                         <field name="id" reporter:datatype="id" />
5409                         <field name="owning_copy" reporter:datatype="link"/>
5410                         <field name="stat_cat" reporter:datatype="link"/>
5411                         <field name="stat_cat_entry" reporter:datatype="link"/>
5412                 </fields>
5413                 <links>
5414                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5415                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5416                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5417                 </links>
5418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5419                         <actions>
5420                                 <retrieve/>
5421                         </actions>
5422                 </permacrud>
5423         </class>
5424         <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">
5425                 <fields oils_persist:primary="code">
5426                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5427                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5428                 </fields>
5429                 <links/>
5430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5431             <actions>
5432                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5433                 <retrieve/>
5434                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5435                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5436             </actions>
5437         </permacrud>
5438         </class>
5439         <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">
5440                 <fields oils_persist:primary="code">
5441                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5442                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5443                 </fields>
5444                 <links/>
5445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5446             <actions>
5447                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5448                 <retrieve/>
5449                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5450                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5451             </actions>
5452         </permacrud>
5453         </class>
5454         <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">
5455                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5456                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5457                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5458                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5459                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5460                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5461                 </fields>
5462                 <links>
5463             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5464         </links>
5465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5466             <actions>
5467                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5468                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5469                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5470                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5471             </actions>
5472         </permacrud>
5473         </class>
5474         <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">
5475                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5476                         <field name="id" reporter:datatype="id" />
5477                         <field name="name" reporter:datatype="text"/>
5478                 </fields>
5479                 <links/>
5480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5481             <actions>
5482                 <create permission="CREATE_LASSO" global_required="true"/>
5483                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5484                 <update permission="UPDATE_LASSO" global_required="true"/>
5485                 <delete permission="DELETE_LASSO" global_required="true"/>
5486             </actions>
5487         </permacrud>
5488         </class>
5489         <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">
5490                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5491                         <field name="id" reporter:datatype="id" />
5492                         <field name="lasso" reporter:datatype="link"/>
5493                         <field name="org_unit" reporter:datatype="org_unit"/>
5494                 </fields>
5495                 <links>
5496                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5497                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5498                 </links>
5499         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5500             <actions>
5501                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5502                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5503                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5504                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5505             </actions>
5506         </permacrud>
5507         </class>
5508         <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">
5509                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5510                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5511                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5512                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5513                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5514                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5515                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5516                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5517                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5518                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5519                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5520                 </fields>
5521                 <links>
5522                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5523                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5524                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5525                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5526                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5527                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5528                 </links>
5529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5530             <actions>
5531                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5532                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5533                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5534                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5535             </actions>
5536         </permacrud>
5537         </class>
5538         <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">
5539                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5540                         <field name="id" reporter:datatype="id" />
5541                         <field name="from_org" reporter:datatype="org_unit"/>
5542                         <field name="to_org" reporter:datatype="org_unit"/>
5543                         <field name="prox" reporter:datatype="int" />
5544                 </fields>
5545                 <links>
5546                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5547                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5548                 </links>
5549         </class>
5550         <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">
5551                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5552                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5553                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5554                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5555                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5556                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5557                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5558                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5559                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5560                 </fields>
5561                 <links/>
5562         </class>
5563         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5564                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5565                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5566                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5567                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5568                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5569                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5570                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5571                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5572                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5573                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5574                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5575                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5576                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5577                 </fields>
5578                 <links>
5579                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5580                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5581                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5582                 </links>
5583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5584             <actions>
5585                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5586                 <retrieve/>
5587                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5588                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5589             </actions>
5590         </permacrud>
5591         </class>
5592         <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">
5593                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5594                         <field name="address_type"  reporter:datatype="text"/>
5595                         <field name="city"  reporter:datatype="text"/>
5596                         <field name="country"  reporter:datatype="text"/>
5597                         <field name="county"  reporter:datatype="text"/>
5598                         <field name="id" reporter:datatype="id" />
5599                         <field name="org_unit" reporter:datatype="org_unit"/>
5600                         <field name="post_code"  reporter:datatype="text"/>
5601                         <field name="state"  reporter:datatype="text"/>
5602                         <field name="street1"  reporter:datatype="text"/>
5603                         <field name="street2"  reporter:datatype="text"/>
5604                         <field name="valid" reporter:datatype="bool"/>
5605                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5606                 </fields>
5607                 <links>
5608                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5609                 </links>
5610         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5611             <actions>
5612                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5613                 <retrieve/>
5614                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5615                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5616             </actions>
5617         </permacrud>
5618         </class>
5619         <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">
5620                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5621                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5622                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5623                         <field name="query_text" reporter:datatype="text"/>
5624                 </fields>
5625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5626             <actions>
5627                 <retrieve/>
5628             </actions>
5629         </permacrud>
5630         </class>
5631
5632         <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">
5633                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5634                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5635                         <field name="owner" reporter:datatype="org_unit"/>
5636                         <field name="code" reporter:datatype="text"/>
5637                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5638                         <field name="create_date" reporter:datatype="timestamp"/>
5639                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5640                 </fields>
5641                 <links>
5642                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5643                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5644                 </links>
5645         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5646             <actions>
5647                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5648                 <retrieve/>
5649                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5650                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5651             </actions>
5652         </permacrud>
5653         </class>
5654         <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">
5655                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5656                         <field name="id" reporter:datatype="id"/>
5657                         <field name="grp" reporter:datatype="link"/>
5658                         <field name="pos" reporter:datatype="int"/>
5659                         <field name="query" reporter:datatype="link"/>
5660                 </fields>
5661                 <links>
5662                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5663                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5664                 </links>
5665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5666             <actions>
5667                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5668                     <context link="grp" field="owner"/>
5669                 </create>
5670                 <retrieve/>
5671                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5672                     <context link="grp" field="owner"/>
5673                 </update>
5674                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5675                     <context link="grp" field="owner"/>
5676                 </delete>
5677             </actions>
5678         </permacrud>
5679         </class>
5680
5681         <!-- A note: Please update alhr and ahopl when updating ahr -->
5682         <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">
5683                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5684                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5685                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5686                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5687                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5688                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5689                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5690                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5691                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5692                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5693                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5694                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5695                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5696                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5697                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5698                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5699                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5700                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5701                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5702                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5703                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5704                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5705                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5706                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5707                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5708                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5709                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5710                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5711                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5712                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5713                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5714                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5715                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5716                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5717                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5718                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5719                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5720                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5721                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5722                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5723                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5724                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5725                 </fields>
5726                 <links>
5727                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5728                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5729                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5730                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5731                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5732                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5733                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5734                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5735                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5736                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5737                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5738                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5739                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5740                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5741                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5742                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5743                 </links>
5744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5745                         <actions>
5746                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5747                         </actions>
5748                 </permacrud>
5749         </class>
5750         <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">
5751                 <oils_persist:source_definition><![CDATA[
5752                 SELECT
5753                         ahr.*,
5754                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5755                                 copy_location_order_position,
5756                         CASE WHEN au.alias IS NOT NULL THEN
5757                                 au.alias
5758                         ELSE
5759                                 au.first_given_name
5760                         END AS usr_alias_or_first_given_name,
5761                         au.first_given_name AS usr_first_given_name,
5762                         au.second_given_name AS usr_second_given_name,
5763                         au.family_name AS usr_family_name,
5764                         au.prefix AS usr_prefix,
5765                         au.suffix AS usr_suffix,
5766                         au.alias AS usr_alias,
5767                         CASE WHEN au.alias IS NOT NULL THEN
5768                                 au.alias
5769                         ELSE
5770                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5771                                         COALESCE(au.family_name, ''),
5772                                         COALESCE(au.suffix, ''),
5773                                         ', ',
5774                                         COALESCE(au.prefix, ''),
5775                                         COALESCE(au.first_given_name, ''),
5776                                         COALESCE(au.second_given_name, '')
5777                                 ], ' '), E'\\s+,', ',')
5778                         END AS usr_alias_or_display_name,
5779                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5780                                 COALESCE(au.family_name, ''),
5781                                 COALESCE(au.suffix, ''),
5782                                 ', ',
5783                                 COALESCE(au.prefix, ''),
5784                                 COALESCE(au.first_given_name, ''),
5785                                 COALESCE(au.second_given_name, '')
5786                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5787                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5788                                 AS call_number_label,
5789                         siss.label AS issuance_label,
5790                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5791                         ahcm_1.copy_count AS potential_copies
5792                 FROM action.hold_request ahr
5793                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5794                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5795                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5796                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5797                 JOIN actor.usr au ON (au.id = ahr.usr)
5798                 JOIN (
5799                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5800                         FROM asset.copy_location
5801                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5802                 LEFT JOIN actor.usr_standing_penalty ausp 
5803                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5804                 LEFT JOIN config.standing_penalty csp
5805                         ON (
5806                                 csp.id = ausp.standing_penalty AND 
5807                                 csp.block_list LIKE '%CAPTURE%' AND (
5808                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5809                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5810                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5811                                         )
5812                                 )
5813                         )
5814                 JOIN (
5815                         SELECT COUNT(target_copy) AS copy_count, hold
5816                         FROM action.hold_copy_map
5817                         GROUP BY 2
5818                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5819                 LEFT JOIN serial.issuance siss
5820                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5821                 LEFT JOIN asset.copy_location_order acplo
5822                         ON (acp.location = acplo.location AND
5823                                 acp.circ_lib = acplo.org)
5824                 WHERE
5825                         ahr.capture_time IS NULL AND
5826                         ahr.cancel_time IS NULL AND
5827                         csp.id IS NULL AND
5828                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5829                         acp.status IN (0,7)
5830                 ]]></oils_persist:source_definition>
5831                 <fields oils_persist:primary="id">
5832                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5833                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5834                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5835                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5836                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5837                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5838                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5839                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5840                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5841                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5842                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5843                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5844                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5845                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5846                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5847                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5848                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5849                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5850                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5851                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5852                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5853                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5854                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5855                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5856                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5857                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5858                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5859                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5860                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5861                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5862                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5863                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5864                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5865                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5866                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5867                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5868                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5869                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5870                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5871                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5872                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5873                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5874                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5875                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5876                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5877                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5878                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5879                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5880                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5881                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5882                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5883                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5884                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5885                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5886                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5887                 </fields>
5888                 <links>
5889                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5890                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5891                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5892                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5893                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5894                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5895                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5896                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5897                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5898                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5899                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5900                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5901                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5902                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5903                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5904                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5905                 </links>
5906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5907                         <actions>
5908                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5909                         </actions>
5910                 </permacrud>
5911         </class>
5912         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5913                 <oils_persist:source_definition>
5914                         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)
5915                 </oils_persist:source_definition>
5916                 <fields oils_persist:primary="id">
5917                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5918                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5919                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5920                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5921                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5922                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5923                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5924                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5925                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5926                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5927                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5928                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5929                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5930                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5931                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5932                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5933                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5934                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5935                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5936                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5937                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5938                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5939                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5940                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5941                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5942                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5943                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5944                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5945                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5946                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5947                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5948                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5949                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5950                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5951                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5952                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5953                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5954                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5955                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5956                 </fields>
5957                 <links>
5958                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5959                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5960                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5961                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5962                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5963                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5964                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5965                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5966                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5967                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5968                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5969                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5970                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5971                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5972                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5973                 </links>
5974         </class>
5975
5976         <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">
5977                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5978                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5979                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5980                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5981                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5982                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5983                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5984                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5985                 </fields>
5986                 <links>
5987                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5988                 </links>
5989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5990                         <actions>
5991                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5992                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5993                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5994                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5995                         </actions>
5996                 </permacrud>
5997         </class>
5998         <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">
5999                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6000                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6001                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6002                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6003                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6004                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6005                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6006                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6007                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6008                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6009                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6010                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6011                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6012                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6013                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6014                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6015                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6016                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6017                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6018                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6019                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6020                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6021                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6022                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6023                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6024                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6025                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6026                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6027                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6028                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6029                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6030                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6031                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6032                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6033                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6034                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6035                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6036                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6037                 </fields>
6038                 <links>
6039                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6040                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6041                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6042                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6043                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6044                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6045                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6046                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6047                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6048                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6049                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6050                 </links>
6051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6052                         <actions>
6053                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6054                         </actions>
6055                 </permacrud>
6056         </class>
6057         <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">
6058                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6059                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6060                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6061                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6062                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6063                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6064                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6065                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6066                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6067                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6068                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6069                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6070                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6071                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6072                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6073                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6074                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6075                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6076                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6077                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6078                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6079                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6080                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6081                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6082                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6083                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6084                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6085                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6086                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6087                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6088                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6089                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6090                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6091                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6092                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6093                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6094                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6095                 </fields>
6096                 <links>
6097                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6098                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6099                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6100                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6101                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6102                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6103                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6104                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6105                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6106                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6107                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6108                 </links>
6109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6110                         <actions>
6111                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6112                         </actions>
6113                 </permacrud>
6114         </class>
6115
6116         <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">
6117                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6118                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6119                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6120                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6121                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6122                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6123                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6124                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6125                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6126                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6127                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6128                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6129                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6130                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6131                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6132                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6133                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6134                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6135                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6136                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6137                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6138                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6139                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6140                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6141                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6142                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6143                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6144                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6145                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6146                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6147                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6148                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6149                 </fields>
6150                 <links>
6151                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6152                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6153                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6154                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6155                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6156                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6157                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6158                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6159                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6160                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6161                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6162                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6163                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6164                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6165                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6166                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6167                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6168                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6169                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6170                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6171                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6172                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6173                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6174                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6175                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6176                 </links>
6177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6178             <actions>
6179                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6180                 <retrieve />
6181                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6182                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6183             </actions>
6184         </permacrud>
6185         </class>
6186         <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">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6188                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6189                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6190                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6191                 </fields>
6192                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6193                         <actions>
6194                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6195                                 <retrieve/>
6196                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6197                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6198                         </actions>
6199                 </permacrud>
6200         </class>
6201         <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">
6202                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6203                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6204                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6205                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6206                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6207                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6208                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6209                 </fields>
6210                 <links>
6211                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6212                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6213                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6214                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6215                 </links>
6216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6217                         <actions>
6218                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6219                                 <retrieve/>
6220                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6221                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6222                         </actions>
6223                 </permacrud>
6224         </class>
6225         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6226                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6227                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6228                         <field name="btype" reporter:datatype="text"/>
6229                         <field name="id" reporter:datatype="id" />
6230                         <field name="name"  reporter:datatype="text"/>
6231                         <field name="description" reporter:datatype="text"/>
6232                         <field name="owner" reporter:datatype="link"/>
6233                         <field name="pub" reporter:datatype="bool"/>
6234                         <field name="create_time" reporter:datatype="timestamp" />
6235                 </fields>
6236                 <links>
6237                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6238                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6239                 </links>
6240         </class>
6241         <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">
6242                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6243                         <field name="id" reporter:datatype="id" />
6244                         <field name="bucket" reporter:datatype="link"/>
6245                         <field name="note" reporter:datatype="text" />
6246                 </fields>
6247                 <links>
6248                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6249                 </links>
6250         </class>
6251         <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">
6252                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6253                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6254                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6255                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6256                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6257                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6258                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6259                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6260                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6261                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6262                 </fields>
6263                 <links>
6264                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6265                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6266                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6267                 </links>
6268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6269                         <actions>
6270                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6271                         </actions>
6272                 </permacrud>
6273         </class>
6274         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6275                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6276                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6277                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6278                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6279                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6280                 </fields>
6281                 <links>
6282                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6283                 </links>
6284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6285                         <actions>
6286                                 <retrieve permission="VIEW_USER">
6287                                         <context link="usr" field="home_ou" />
6288                                 </retrieve>
6289                         </actions>
6290                 </permacrud>
6291         </class>
6292     <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">
6293         <fields oils_persist:primary="field">
6294             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6295             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6296             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6297         </fields>
6298         <links/>
6299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6300             <actions>
6301                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6302                 <retrieve />
6303                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6304                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6305             </actions>
6306         </permacrud>
6307     </class>
6308         <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">
6309                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6310                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6311                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6312                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6313                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6314                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6315                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6316                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6317                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6318                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6319                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6320                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6321                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6322                 </fields>
6323                 <links>
6324                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6325                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6326                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6327                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6328                 </links>
6329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6330             <actions>
6331                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6332                 <retrieve />
6333                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6334                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6335             </actions>
6336         </permacrud>
6337         </class>
6338         <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">
6339                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6340                         <field name="field" reporter:datatype="link"/>
6341                         <field name="id" reporter:datatype="id" />
6342                         <field name="source" reporter:datatype="link"/>
6343                         <field name="value"  reporter:datatype="text"/>
6344                 </fields>
6345                 <links>
6346                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6347                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6348                 </links>
6349         </class>
6350         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6351                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6352                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6353                         <field name="btype" reporter:datatype="text"/>
6354                         <field name="id" reporter:datatype="id" />
6355                         <field name="name"  reporter:datatype="text"/>
6356                         <field name="description" reporter:datatype="text"/>
6357                         <field name="owner" reporter:datatype="link"/>
6358                         <field name="pub" reporter:datatype="bool"/>
6359                         <field name="create_time" reporter:datatype="timestamp" />
6360                 </fields>
6361                 <links>
6362                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6363                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6364                 </links>
6365         </class>
6366         <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">
6367                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6368                         <field name="id" reporter:datatype="id" />
6369                         <field name="bucket" reporter:datatype="link"/>
6370                         <field name="note" reporter:datatype="text" />
6371                 </fields>
6372                 <links>
6373                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6374                 </links>
6375         </class>
6376         <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">
6377                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6378                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6379                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6380                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6381                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6382                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6383                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6384                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6385                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6386                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6387                 </fields>
6388                 <links>
6389                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6390                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6391                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6392                 </links>
6393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6394             <actions>
6395                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6396                     <context link="xact" jump="usr" field="home_ou"/>
6397                 </retrieve>
6398                         </actions>
6399                 </permacrud>
6400         </class>
6401         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6402                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6403                         <field name="id" reporter:datatype="id" />
6404                         <field name="ind1" />
6405                         <field name="ind2" />
6406                         <field name="record" />
6407                         <field name="subfield" />
6408                         <field name="tag" />
6409                         <field name="value" />
6410                 </fields>
6411                 <links>
6412                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6413                 </links>
6414         </class>
6415         <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">
6416                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6417                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6418                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6419                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6420                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6421                 </fields>
6422                 <links>
6423                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6424                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6425                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6426                 </links>
6427         </class>
6428         <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">
6429                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6430                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6431                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6432                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6433                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6434                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6435                 </fields>
6436                 <links>
6437                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6438                 </links>
6439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6440             <actions>
6441                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6442                 <retrieve/>
6443                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6444                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6445             </actions>
6446         </permacrud>
6447
6448         </class>
6449         <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">
6450                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6451                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6452                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6453                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6454                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6455                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6456                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6457                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6458                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6459                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6460                 </fields>
6461                 <links>
6462                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6463                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6464                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6465                 </links>
6466         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6467             <actions>
6468                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6469                 <retrieve/>
6470                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6471                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6472             </actions>
6473         </permacrud>
6474         </class>
6475         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6476                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6477                         <field name="create_date" reporter:datatype="timestamp"/>
6478                         <field name="creator" reporter:datatype="link"/>
6479                         <field name="edit_date" reporter:datatype="timestamp"/>
6480                         <field name="editor" reporter:datatype="link"/>
6481                         <field name="id" reporter:datatype="id" />
6482                         <field name="pub" reporter:datatype="bool"/>
6483                         <field name="record" reporter:datatype="link"/>
6484                         <field name="value"  reporter:datatype="text"/>
6485                 </fields>
6486                 <links>
6487                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6488                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6489                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6490                 </links>
6491         </class>
6492         <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">
6493                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6494                         <field name="balance_owed" reporter:datatype="money" />
6495                         <field name="total_owed" reporter:datatype="money" />
6496                         <field name="total_paid" reporter:datatype="money" />
6497                         <field name="usr" reporter:datatype="link"/>
6498                 </fields>
6499                 <links>
6500                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6501                 </links>
6502         </class>
6503         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6504                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6505                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6506                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6507                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6508                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6509                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6510                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6511                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6512                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6513                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6514                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6515                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6516                 </fields>
6517                 <links>
6518                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6519                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6520                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6521                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6522                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6523                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6524                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6525                 </links>
6526         </class>
6527         <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">
6528                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6529                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6530                         <field name="quality" reporter:datatype="int" />
6531                         <field name="source" reporter:datatype="text"/>
6532                         <field name="transcendant" reporter:datatype="bool"/>
6533                         <field name="can_have_copies" reporter:datatype="bool"/>
6534                 </fields>
6535                 <links/>
6536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6537             <actions>
6538                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6539                 <retrieve/>
6540                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6541                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6542             </actions>
6543         </permacrud>
6544         </class>
6545         <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">
6546                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6547                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6548                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6549                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6550                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6551                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6552                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6553                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6554                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6555                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6556                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6557                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6558                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6559                 </fields>
6560                 <links>
6561                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6562                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6563                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6564                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6565                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6566                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6567                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6568                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6569                 </links>
6570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6571                         <actions>
6572                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6573                                         <context link="usr" field="home_ou" />
6574                                 </retrieve>
6575                         </actions>
6576                 </permacrud>
6577         </class>
6578         <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">
6579                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6580                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6581                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6582                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6583                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6584                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6585                 </fields>
6586                 <links>
6587                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6588                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6589                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6590                 </links>
6591         </class>
6592         <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">
6593                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6594                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6595                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6596                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6597                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6598                 </fields>
6599                 <links>
6600                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6601                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6602                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6603                 </links>
6604         </class>
6605         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
6606                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6607                         <field name="bucket" reporter:datatype="link"/>
6608                         <field name="id" reporter:datatype="id" />
6609                         <field name="target_user" reporter:datatype="link"/>
6610                         <field name="create_time" reporter:datatype="timestamp" />
6611                         <field name="pos" reporter:datatype="int" />
6612                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6613                 </fields>
6614                 <links>
6615                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6616                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6617             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6618                 </links>
6619         </class>
6620         <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">
6621                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6622                         <field name="id" reporter:datatype="id" />
6623                         <field name="item" reporter:datatype="link"/>
6624                         <field name="note" reporter:datatype="text" />
6625                 </fields>
6626                 <links>
6627                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6628                 </links>
6629         </class>
6630         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6631                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6632                         <field name="balance_owed" reporter:datatype="money" />
6633                         <field name="total_owed" reporter:datatype="money" />
6634                         <field name="total_paid" reporter:datatype="money" />
6635                         <field name="usr" reporter:datatype="link"/>
6636                 </fields>
6637                 <links>
6638                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6639                 </links>
6640         </class>
6641         <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">
6642                 <fields oils_persist:primary="code" oils_persist:sequence="">
6643                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6644                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6645                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6646                 </fields>
6647                 <links/>
6648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6649             <actions>
6650                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6651                 <retrieve/>
6652                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6653                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6654             </actions>
6655         </permacrud>
6656         </class>
6657         <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">
6658                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6659                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6660                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6661                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6662                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6663                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6664                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6665                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6666                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6667                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6668                 </fields>
6669                 <links>
6670                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6671                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6672                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6673                 </links>
6674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6675             <actions>
6676                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6677                     <context link="xact" jump="usr" field="home_ou"/>
6678                 </retrieve>
6679                         </actions>
6680                 </permacrud>
6681         </class>
6682         <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">
6683                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6684                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6685                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6686                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6687                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6688                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6689                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6690                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6691                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6692                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6693                 </fields>
6694                 <links>
6695                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6696                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6697                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6698                 </links>
6699         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6700             <actions>
6701                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6702                     <context link="xact" jump="usr" field="home_ou"/>
6703                 </retrieve>
6704                         </actions>
6705                 </permacrud>
6706         </class>
6707         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6708                 <fields oils_persist:primary="id" oils_persist:sequence="">
6709                         <field name="checkin_lib" reporter:datatype="link"/>
6710                         <field name="checkin_staff" reporter:datatype="link"/>
6711                         <field name="checkin_time" reporter:datatype="timestamp"/>
6712                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6713                         <field name="circ_staff" reporter:datatype="link"/>
6714                         <field name="desk_renewal" reporter:datatype="bool"/>
6715                         <field name="due_date" reporter:datatype="timestamp"/>
6716                         <field name="duration" reporter:datatype="interval"/>
6717                         <field name="duration_rule" reporter:datatype="link"/>
6718                         <field name="fine_interval" reporter:datatype="interval"/>
6719                         <field name="id" reporter:datatype="id" />
6720                         <field name="max_fine" reporter:datatype="money" />
6721                         <field name="max_fine_rule" reporter:datatype="link"/>
6722                         <field name="opac_renewal" reporter:datatype="bool"/>
6723                         <field name="phone_renewal" reporter:datatype="bool"/>
6724                         <field name="recurring_fine" reporter:datatype="money" />
6725                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6726                         <field name="renewal_remaining" reporter:datatype="int" />
6727             <field name="grace_period" reporter:datatype="interval" />
6728                         <field name="stop_fines" reporter:datatype="text"/>
6729                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6730                         <field name="target_copy" reporter:datatype="link"/>
6731                         <field name="usr" reporter:datatype="link"/>
6732                         <field name="xact_finish" reporter:datatype="timestamp" />
6733                         <field name="xact_start" reporter:datatype="timestamp" />
6734                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6735                 </fields>
6736                 <links>
6737                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6738                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6739                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6740                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6741                 </links>
6742         </class>
6743         <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">
6744                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6745                         <field name="field" reporter:datatype="link"/>
6746                         <field name="id" reporter:datatype="id" />
6747                         <field name="source" reporter:datatype="link"/>
6748                         <field name="value" reporter:datatype="text"/>
6749                 </fields>
6750                 <links>
6751                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6752                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6753                 </links>
6754         </class>
6755         <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">
6756                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6757                         <field name="high" reporter:datatype="money" />
6758                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6759                         <field name="low" reporter:datatype="money" />
6760                         <field name="name" reporter:datatype="text"/>
6761                         <field name="normal" reporter:datatype="money" />
6762                         <field name="recurrence_interval" reporter:datatype="interval"/>
6763             <field name="grace_period" reporter:datatype="interval" />
6764                 </fields>
6765                 <links/>
6766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6767             <actions>
6768                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6769                 <retrieve/>
6770                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6771                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6772             </actions>
6773         </permacrud>
6774         </class>
6775         <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">
6776                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6777                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6778                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6779                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6780                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6781                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6782                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6783                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6784                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6785                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6786                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6787                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6788                 </fields>
6789                 <links>
6790                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6791                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6792                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6793                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6794                 </links>
6795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6796             <actions>
6797                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6798                     <context link="xact" jump="usr" field="home_ou"/>
6799                 </retrieve>
6800                         </actions>
6801                 </permacrud>
6802         </class>
6803         <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">
6804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6805                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6806                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6807                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6808                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6809                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6810                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6811                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6812                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6813                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6814                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6815                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6816                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6817                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6818                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6819                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6820                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6821                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6822                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6823                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6824                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6825                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6826                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6827                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6828                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6829                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6830                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6831                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6832                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6833                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6834                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6835                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6836                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6837                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6838                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6839                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6840                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6841                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6842                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6843                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6844                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6845                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6846                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6847                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6848                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6849                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6850                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6851                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6852                 </fields>
6853                 <links>
6854                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6855                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6856                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6857                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6858                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6859                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6860                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6861                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6862                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6863                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6864                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6865                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6866                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6867                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6868                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6869                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6870                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6871                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6872                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6873                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6874                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6875                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6876                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6877                 </links>
6878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6879             <actions>
6880                 <create permission="CREATE_COPY">
6881                     <context link="call_number" field="owning_lib"/>
6882                 </create>
6883                 <retrieve/>
6884                 <update permission="UPDATE_COPY">
6885                     <context link="call_number" field="owning_lib"/>
6886                 </update>
6887                 <delete permission="DELETE_COPY">
6888                     <context link="call_number" field="owning_lib"/>
6889                 </delete>
6890             </actions>
6891         </permacrud>
6892         </class>
6893
6894         <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">
6895                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6896                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6897                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6898                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6899                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6900                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6901                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6902                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6903                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6904                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6905                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6906                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6907                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6908                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6909                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6910                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6911                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6912                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6913                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6914                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6915                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6916                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6917                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6918                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6919                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6920                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6921                 </fields>
6922                 <links>
6923                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6924                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6925                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6926                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6927                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6928                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6929                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6930                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6931                 </links>
6932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6933                         <actions>
6934                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6935                                 <retrieve />
6936                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6937                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6938                         </actions>
6939                 </permacrud>
6940         </class>
6941
6942         <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">
6943                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6944                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6945                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6946                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6947                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6948                 </fields>
6949                 <links/>
6950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6951             <actions>
6952                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6953                 <retrieve/>
6954                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6955                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6956             </actions>
6957         </permacrud>
6958         </class>
6959         <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">
6960                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6961                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6962                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6963                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6964                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6965                 </fields>
6966                 <links/>
6967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6968             <actions>
6969                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6970                 <retrieve/>
6971                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6972                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6973             </actions>
6974         </permacrud>
6975         </class>
6976         <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">
6977                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6978                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6980                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6981                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6982                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6983                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6984                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6985                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6986                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6987                 </fields>
6988                 <links>
6989                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6990                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6991                 </links>
6992         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6993             <actions>
6994                 <create permission="CREATE_PERM" global_required="true"/>
6995                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6996                 <update permission="UPDATE_PERM" global_required="true"/>
6997                 <delete permission="DELETE_PERM" global_required="true"/>
6998             </actions>
6999         </permacrud>
7000         </class>
7001         <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">
7002                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7003                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7004                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7005                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7006                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7007                 </fields>
7008                 <links>
7009                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7010                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7011                 </links>
7012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7013             <actions>
7014                 <create permission="ADMIN_SURVEY">
7015                     <context link="question" jump="survey" field="owner"/>
7016                 </create>
7017                 <retrieve/>
7018                 <update permission="ADMIN_SURVEY">
7019                     <context link="question" jump="survey" field="owner"/>
7020                 </update>
7021                 <delete permission="ADMIN_SURVEY">
7022                     <context link="question" jump="survey" field="owner"/>
7023                 </delete>
7024             </actions>
7025         </permacrud>
7026         </class>
7027         <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">
7028                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7029                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7030                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7031                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7032                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7033                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7034                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7035                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7036                 </fields>
7037                 <links>
7038                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7039                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7040                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7041                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7042                 </links>
7043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7044                         <actions>
7045                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7046                         </actions>
7047                 </permacrud>
7048         </class>
7049         <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">
7050                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7051                         <field name="balance_owed" reporter:datatype="money" />
7052                         <field name="total_owed" reporter:datatype="money" />
7053                         <field name="total_paid" reporter:datatype="money" />
7054                         <field name="usr" reporter:datatype="link"/>
7055                 </fields>
7056                 <links>
7057                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7058                 </links>
7059         </class>
7060         <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">
7061                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7062                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7063                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7064                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7065                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7066                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7067                 </fields>
7068                 <links>
7069                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7070                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7071                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7072                 </links>
7073         </class>
7074         <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">
7075                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7076                         <field name="field" reporter:datatype="link"/>
7077                         <field name="id" reporter:datatype="id" />
7078                         <field name="source" reporter:datatype="link"/>
7079                         <field name="value" reporter:datatype="text"/>
7080                 </fields>
7081                 <links>
7082                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7083                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7084                 </links>
7085         </class>
7086         <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">
7087                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7088                         <field name="field" reporter:datatype="link"/>
7089                         <field name="id" reporter:datatype="id" />
7090                         <field name="source" reporter:datatype="link"/>
7091                         <field name="value" reporter:datatype="text"/>
7092                 </fields>
7093                 <links>
7094                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7095                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7096                 </links>
7097         </class>
7098         <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">
7099                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7100                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7101                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7102                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7103                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7104                 </fields>
7105                 <links>
7106                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7107                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7108                 </links>
7109         </class>
7110         <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">
7111                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7112                         <field name="depth" reporter:datatype="int" />
7113                         <field name="grantable" reporter:datatype="bool"/>
7114                         <field name="grp" reporter:datatype="link"/>
7115                         <field name="id" reporter:datatype="id" />
7116                         <field name="perm" reporter:datatype="link"/>
7117                 </fields>
7118                 <links>
7119                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7120                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7121                 </links>
7122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7123             <actions>
7124                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7125                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7126                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7127                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7128             </actions>
7129         </permacrud>
7130         </class>
7131         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7132                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7133                         <field name="items" oils_persist:virtual="true" />
7134                         <field name="btype" reporter:datatype="text"/>
7135                         <field name="id" reporter:datatype="id" />
7136                         <field name="name" reporter:datatype="text"/>
7137                         <field name="description" reporter:datatype="text"/>
7138                         <field name="owner" reporter:datatype="link"/>
7139                         <field name="pub" reporter:datatype="bool"/>
7140                         <field name="create_time" reporter:datatype="timestamp" />
7141                 </fields>
7142                 <links>
7143                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7144                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7145                 </links>
7146         </class>
7147         <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">
7148                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7149                         <field name="id" reporter:datatype="id" />
7150                         <field name="bucket" reporter:datatype="link"/>
7151                         <field name="note" reporter:datatype="text" />
7152                 </fields>
7153                 <links>
7154                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7155                 </links>
7156         </class>
7157         <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">
7158                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7159                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7160                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7161                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7162                 </fields>
7163                 <links>
7164                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7165                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7166                 </links>
7167         </class>
7168         <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">
7169                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7170                         <field name="depth" reporter:datatype="int"/>
7171                         <field name="grantable" reporter:datatype="bool"/>
7172                         <field name="id" reporter:datatype="id" />
7173                         <field name="perm" reporter:datatype="link"/>
7174                         <field name="usr" reporter:datatype="link"/>
7175                 </fields>
7176                 <links>
7177                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7178                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7179                 </links>
7180         </class>
7181         <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">
7182                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7183                         <field name="object_id" reporter:datatype="text"/>
7184                         <field name="grantable" reporter:datatype="bool"/>
7185                         <field name="id" reporter:datatype="id" />
7186                         <field name="perm" reporter:datatype="link"/>
7187                         <field name="usr" reporter:datatype="link"/>
7188                         <field name="object_type" reporter:datatype="text"/>
7189                 </fields>
7190                 <links>
7191                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7192                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7193                 </links>
7194         </class>
7195         <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">
7196                 <fields oils_persist:primary="id" oils_persist:sequence="">
7197                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7198                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7199                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7200                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7201                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7202                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7203                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7204                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7212                 </fields>
7213                 <links>
7214                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7215                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7216                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7217                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7218                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7219                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7220                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7221                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7222                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7223                 </links>
7224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7225             <actions>
7226                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7227                     <context link="xact" jump="usr" field="home_ou"/>
7228                 </retrieve>
7229                         </actions>
7230                 </permacrud>
7231         </class>
7232         <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">
7233                 <fields oils_persist:primary="id" oils_persist:sequence="">
7234                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7235                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7236                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7237                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7238                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7239                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7240                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7241                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7242                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7243                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7244                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7245                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7246                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7247                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7248                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7249                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7250                 </fields>
7251                 <links>
7252                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7253                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7254                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7255                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7256                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7257                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7258                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7259                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7260                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7261                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7262                 </links>
7263         </class>
7264         <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">
7265                 <fields oils_persist:primary="id" oils_persist:sequence="">
7266                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7267                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7268                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7269                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7270                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7271                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7272                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7273                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7274                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7275                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7276                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7277                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7278                 </fields>
7279                 <links>
7280                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7281                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7282                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7283                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7284                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7285                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7286                 </links>
7287         </class>
7288         <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">
7289                 <fields oils_persist:primary="id" oils_persist:sequence="">
7290                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7291                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7292                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7293                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7294                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7295                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7296                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7297                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7298                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7299                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7300                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7301                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7302                 </fields>
7303                 <links>
7304                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7305                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7306                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7307                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7308                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7309                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7310                 </links>
7311         </class>
7312         <class id="cbrebi" controller="open-ils.cstore" 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">
7313                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7314                         <field name="bucket" reporter:datatype="link"/>
7315                         <field name="id" reporter:datatype="id" />
7316                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7317                         <field name="create_time" reporter:datatype="timestamp" />
7318                         <field name="pos" reporter:datatype="int" />
7319                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7320                 </fields>
7321                 <links>
7322                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7323                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7324             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7325                 </links>
7326         </class>
7327         <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">
7328                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7329                         <field name="id" reporter:datatype="id" />
7330                         <field name="item" reporter:datatype="link"/>
7331                         <field name="note" reporter:datatype="text" />
7332                 </fields>
7333                 <links>
7334                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7335                 </links>
7336         </class>
7337         <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">
7338                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7339                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7340                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7341                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7342                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7343                 </fields>
7344                 <links>
7345                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7346                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7347                 </links>
7348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7349                         <actions>
7350                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7351                         </actions>
7352                 </permacrud>
7353         </class>
7354     <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">
7355         <fields oils_persist:primary="field">
7356             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7357             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7358             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7359         </fields>
7360         <links/>
7361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7362             <actions>
7363                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7364                 <retrieve />
7365                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7366                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7367             </actions>
7368         </permacrud>
7369     </class>
7370         <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">
7371                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7372                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7373                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7374                 </fields>
7375                 <links/>
7376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7377             <actions>
7378                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7379                 <retrieve/>
7380                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7381                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7382             </actions>
7383         </permacrud>
7384         </class>
7385
7386
7387         <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">
7388                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7389                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7390                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7391                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7392                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7393                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7394                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7395                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7396                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7397                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7398                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7399                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7400                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7401                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7402                 </fields>
7403                 <links>
7404                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7405                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7406                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7407                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7408                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7409                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7410                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7411                 </links>
7412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7413             <actions>
7414                 <create permission="TRANSIT_COPY">
7415                     <context link="target_copy" field="owner"/>
7416                 </create>
7417                 <retrieve/>
7418                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7419                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7420             </actions>
7421         </permacrud>
7422         </class>
7423         <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">
7424                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7425                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7426                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7427                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7428                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7429                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7430                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7431                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7432                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7433                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7434                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7435                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7436                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7437                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7438                 </fields>
7439                 <links>
7440                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7441                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7442                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7443                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7444                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7445                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7446                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7447                 </links>
7448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7449             <actions>
7450                 <create permission="TRANSIT_COPY" context_field="owner">
7451                     <context link="target_copy" field="circ_lib"/>
7452                 </create>
7453                 <retrieve/>
7454                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7455                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7456             </actions>
7457         </permacrud>
7458         </class>
7459         <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">
7460                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7461                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7462                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7463                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7464                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7465                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7466                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7467                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7468                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7469                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7470                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7471                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7472                 </fields>
7473                 <links>
7474                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7475                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7476                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7477                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7478                 </links>
7479         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7480             <actions>
7481                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7482                     <context link="xact" jump="usr" field="home_ou"/>
7483                 </retrieve>
7484                         </actions>
7485                 </permacrud>
7486         </class>
7487         <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">
7488                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7489                         <field name="grp" />
7490                         <field name="id" reporter:datatype="id" />
7491                         <field name="usr" />
7492                 </fields>
7493                 <links>
7494                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7495                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7496                 </links>
7497         </class>
7498         <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">
7499                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7500                         <field name="id" reporter:datatype="id" />
7501                         <field name="fq_field" reporter:datatype="text"/>
7502                         <field name="identity_value" reporter:datatype="text"/>
7503                         <field name="translation" reporter:datatype="text"/>
7504                         <field name="string" reporter:datatype="text"/>
7505                 </fields>
7506                 <links>
7507                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7508                 </links>
7509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7510             <actions>
7511                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7512                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7513                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7514                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7515             </actions>
7516         </permacrud>
7517         </class>
7518         <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">
7519                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7520                         <field name="id" reporter:datatype="id" />
7521                         <field name="fm_class" reporter:datatype="text"/>
7522                         <field name="field" reporter:datatype="text"/>
7523                         <field name="owner" reporter:datatype="org_unit"/>
7524                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7525                 </fields>
7526                 <links>
7527                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7528                 </links>
7529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7530             <actions>
7531                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7532                 <retrieve/>
7533                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7534                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7535             </actions>
7536         </permacrud>
7537         </class>
7538         <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">
7539                 <fields oils_persist:primary="code">
7540                         <field name="code" reporter:datatype="id" />
7541                         <field name="marc_code" reporter:datatype="text"/>
7542                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7543                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7544                         <field name="rtl" reporter:datatype="bool"/>
7545                 </fields>
7546                 <links/>
7547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7548             <actions>
7549                 <create permission="CREATE_LOCALE" global_required="true"/>
7550                 <retrieve/>
7551                 <update permission="UPDATE_LOCALE" global_required="true"/>
7552                 <delete permission="DELETE_LOCALE" global_required="true"/>
7553             </actions>
7554         </permacrud>
7555         </class>
7556         <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">
7557                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7558                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7559                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7560                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7561             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7562                 </fields>
7563                 <links>
7564                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7565                 </links>
7566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7567             <actions>
7568                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7569                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7570                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7571                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7572             </actions>
7573         </permacrud>
7574         </class>
7575
7576         <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">
7577                 <fields oils_persist:primary="id">
7578                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7579                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7580                 </fields>
7581                 <links/>
7582         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7583             <actions>
7584                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7585                 <retrieve/>
7586                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7587                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7588             </actions>
7589         </permacrud>
7590         </class>
7591
7592         <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">
7593                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7594                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7595                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7596                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7597                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7598                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7599                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7600                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7601                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7602                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7603                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7604                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7605                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7606                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7607                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7608                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7609                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7610                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7611                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7612                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7613                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7614                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7615                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7616                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7617                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7618                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7619                 </fields>
7620                 <links>
7621                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7622                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7623                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7624                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7625                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7626                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7627                 </links>
7628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7629             <actions>
7630                 <create permission="user_request.create">
7631                     <context link="usr" field="home_ou"/>
7632                                 </create>
7633                 <retrieve permission="user_request.view">
7634                     <context link="usr" field="home_ou"/>
7635                                 </retrieve>
7636                 <update permission="user_request.update">
7637                     <context link="usr" field="home_ou"/>
7638                                 </update>
7639                 <delete permission="user_request.delete">
7640                     <context link="usr" field="home_ou"/>
7641                                 </delete>
7642             </actions>
7643         </permacrud>
7644         </class>
7645
7646         <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">
7647                 <fields oils_persist:primary="code">
7648                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7649                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7650                 </fields>
7651                 <links/>
7652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7653             <actions>
7654                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7655                 <retrieve/>
7656                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7657                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7658             </actions>
7659         </permacrud>
7660         </class>
7661
7662         <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">
7663                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7664                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7665                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7666                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7667                         <field reporter:label="Ratio" name="ratio" />
7668                 </fields>
7669                 <links>
7670                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7671                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7672                 </links>
7673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7674                         <actions>
7675                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7676                                 <retrieve/>
7677                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7678                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7679                         </actions>
7680                 </permacrud>
7681         </class>
7682
7683         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7684                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7685                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7686                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7687                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7688                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7689                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7690                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7691                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7692                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7693                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7694                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7695                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7696                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7697                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7698                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7699                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7700                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7701                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7702                         <field reporter:label="Note" name="provider_note" reporter:datatype="link" />
7703                 </fields>
7704                 <links>
7705                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7706                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7707             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7708             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7709                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7710                         <link field="provider_note" reltype="has_a" map="" key="id" class="acqpron"/>
7711                 </links>
7712         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7713             <actions>
7714                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7715                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7716                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7717                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7718             </actions>
7719         </permacrud>
7720         </class>
7721
7722         <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">
7723                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7724                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7725                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7726                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7727                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7728                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7729                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7730                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7731                 </fields>
7732                 <links>
7733                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7734                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7735                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7736                 </links>
7737         </class>
7738
7739         <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">
7740                 <fields oils_persist:primary="code">
7741                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7742                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7743                 </fields>
7744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7745             <actions>
7746                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7747                 <retrieve/>
7748                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7749                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7750             </actions>
7751                 </permacrud>
7752         </class>
7753
7754         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7755                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7756                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7757                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7758                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7759                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7760                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7761                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7762                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7763                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7764                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7765                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7766                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7767                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7768                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7769                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7770                 </fields>
7771                 <links>
7772                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7773                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7774                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7775                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7776                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7777                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7778                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7779                 </links>
7780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7781             <actions>
7782                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7783                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7784                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7785                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7786             </actions>
7787         </permacrud>
7788         </class>
7789
7790         <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">
7791                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7792                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7793                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7794                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7795                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7796                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7797                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7798                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7799                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7800                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7801                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7802                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7803                 </fields>
7804                 <links>
7805                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7806                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7807                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7808                 </links>
7809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7810             <actions>
7811                 <create   permission="ADMIN_INVOICE">
7812                                         <context link="invoice" field="receiver"/>
7813                                 </create>
7814                 <retrieve permission="ADMIN_INVOICE">
7815                                         <context link="invoice" field="receiver"/>
7816                                 </retrieve>
7817                 <update   permission="ADMIN_INVOICE">
7818                                         <context link="invoice" field="receiver"/>
7819                                 </update>
7820                                 <delete   permission="ADMIN_INVOICE">
7821                                         <context link="invoice" field="receiver"/>
7822                                 </delete>
7823             </actions>
7824         </permacrud>
7825         </class>
7826
7827         <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">
7828                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7829                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7830                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7831                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7832                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7833                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7834                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7835                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7836                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7837                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7838                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7839                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7840                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7841                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7842                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7843                 </fields>
7844                 <links>
7845                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7846                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7847                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7848                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7849                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7850                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7851                 </links>
7852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7853             <actions>
7854                 <create   permission="ADMIN_INVOICE">
7855                                         <context link="invoice" field="receiver"/>
7856                                 </create>
7857                 <retrieve permission="ADMIN_INVOICE">
7858                                         <context link="invoice" field="receiver"/>
7859                                 </retrieve>
7860                 <update   permission="ADMIN_INVOICE">
7861                                         <context link="invoice" field="receiver"/>
7862                                 </update>
7863                                 <delete   permission="ADMIN_INVOICE">
7864                                         <context link="invoice" field="receiver"/>
7865                                 </delete>
7866             </actions>
7867         </permacrud>
7868         </class>
7869
7870         <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">
7871                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7872                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7873                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7874                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7875                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7876                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7877                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7878                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7879                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7880                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7881                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7882                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7883                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7884                 </fields>
7885                 <links>
7886                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7887                 </links>
7888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7889             <actions>
7890                 <create permission="ADMIN_PROVIDER">
7891                     <context link="provider" field="owner"/>
7892                 </create>
7893                 <retrieve permission="ADMIN_PROVIDER">
7894                     <context link="provider" field="owner"/>
7895                 </retrieve>
7896                 <update permission="ADMIN_PROVIDER">
7897                     <context link="provider" field="owner"/>
7898                 </update>
7899                 <delete permission="ADMIN_PROVIDER">
7900                     <context link="provider" field="owner"/>
7901                 </delete>
7902             </actions>
7903         </permacrud>
7904         </class>
7905
7906         <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">
7907                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7909                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7910                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7911                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7912                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7913                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7914         </fields>
7915                 <links>
7916                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7917                 </links>
7918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7919             <actions>
7920                 <create permission="ADMIN_PROVIDER">
7921                     <context link="provider" field="owner"/>
7922                 </create>
7923                 <retrieve permission="ADMIN_PROVIDER">
7924                     <context link="provider" field="owner"/>
7925                 </retrieve>
7926                 <update permission="ADMIN_PROVIDER">
7927                     <context link="provider" field="owner"/>
7928                 </update>
7929                 <delete permission="ADMIN_PROVIDER">
7930                     <context link="provider" field="owner"/>
7931                 </delete>
7932             </actions>
7933         </permacrud>
7934     </class>
7935         <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">
7936                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7937                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7938                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7939                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7940                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7941                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7942                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7943                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7944                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7945                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7946                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7947                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7948                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7949                 </fields>
7950                 <links>
7951                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7952                 </links>
7953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7954             <actions>
7955                 <create permission="ADMIN_PROVIDER">
7956                     <context link="contact" jump='provider' field="owner"/>
7957                 </create>
7958                 <retrieve permission="ADMIN_PROVIDER">
7959                     <context link="contact" jump='provider' field="owner"/>
7960                 </retrieve>
7961                 <update permission="ADMIN_PROVIDER">
7962                     <context link="contact" jump='provider' field="owner"/>
7963                 </update>
7964                 <delete permission="ADMIN_PROVIDER">
7965                     <context link="contact" jump='provider' field="owner"/>
7966                 </delete>
7967             </actions>
7968         </permacrud>
7969         </class>
7970
7971         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7973                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7974                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7975                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7976                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7977                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7978                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7979                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7980                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7981                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7982                 </fields>
7983                 <links>
7984                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7985                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7986                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7987                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7988                 </links>
7989         </class>
7990
7991         <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">
7992                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7993                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7994                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7995                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7996                 </fields>
7997                 <links>
7998             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7999                 </links>
8000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8001                         <actions>
8002                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8003                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8004                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8005                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8006                         </actions>
8007                 </permacrud>
8008         </class>
8009
8010         <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">
8011                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8012                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8013                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8014                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8015                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8016                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8017                 </fields>
8018                 <links>
8019                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8020                 </links>
8021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8022                         <actions>
8023                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8024                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8025                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8026                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8027                         </actions>
8028                 </permacrud>
8029         </class>
8030
8031         <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">
8032                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8033                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8034                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8035                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8036                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8037                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8038                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8039                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8040                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8041                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8042                 </fields>
8043                 <links>
8044                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8045                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8046             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8047             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8048                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8049                 </links>
8050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8051             <actions>
8052                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8053                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8054                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8055                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8056             </actions>
8057         </permacrud>
8058         </class>
8059
8060         <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">
8061                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8062                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8063                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8064                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8065                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8066                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8067                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8068                 </fields>
8069                 <links>
8070                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8071                 </links>
8072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8073                         <actions>
8074                                 <create permission="ADMIN_FUNDING_SOURCE">
8075                     <context link="funding_source" field="owner"/>
8076                 </create>
8077                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8078                     <context link="funding_source" field="owner"/>
8079                 </retrieve>
8080                                 <update permission="ADMIN_FUNDING_SOURCE">
8081                     <context link="funding_source" field="owner"/>
8082                 </update>
8083                                 <delete permission="ADMIN_FUNDING_SOURCE">
8084                     <context link="funding_source" field="owner"/>
8085                 </delete>
8086                         </actions>
8087                 </permacrud>
8088         </class>
8089
8090         <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">
8091                 <fields oils_persist:primary="id">
8092                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8093                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8094                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8095                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8096                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8097                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8098                 </fields>
8099                 <links>
8100                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8101                 </links>
8102         </class>
8103
8104         <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">
8105                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8106                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8107                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8108                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8109                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8110                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8111                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8112                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8113                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8114                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8115                 </fields>
8116                 <links>
8117                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8118                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8119                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8120                 </links>
8121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8122                         <actions>
8123                                 <create permission="ADMIN_ACQ_FUND">
8124                     <context link="fund" field="org"/>
8125                 </create>
8126                                 <retrieve permission="ADMIN_ACQ_FUND">
8127                     <context link="fund" field="org"/>
8128                 </retrieve>
8129                                 <update permission="ADMIN_ACQ_FUND">
8130                     <context link="fund" field="org"/>
8131                 </update>
8132                                 <delete permission="ADMIN_ACQ_FUND">
8133                     <context link="fund" field="org"/>
8134                 </delete>
8135                         </actions>
8136                 </permacrud>
8137         </class>
8138
8139         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8141                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8142                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8143                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8144                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8145                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8146                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8147                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8148                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8149                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8150                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8151                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8152                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8153                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8154                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8155                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8156                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8157                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8158                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8159                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8160                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8161                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8162                 </fields>
8163                 <links>
8164                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8165                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8166             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8167             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8168             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8169             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8170             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8171             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8172             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8173             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8174             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8175                 </links>
8176         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8177             <actions>
8178                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8179                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8180                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8181                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8182             </actions>
8183         </permacrud>
8184         </class>
8185
8186         <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">
8187                 <fields oils_persist:primary="fund">
8188                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8189                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8190                 </fields>
8191                 <links>
8192                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8193                 </links>
8194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8195             <actions>
8196                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8197                                         <context link="fund" field="org" />
8198                 </retrieve>
8199             </actions>
8200         </permacrud>
8201         </class>
8202
8203         <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">
8204                 <fields oils_persist:primary="fund">
8205                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8206                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8207                 </fields>
8208                 <links>
8209                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8210                 </links>
8211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8212             <actions>
8213                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8214                                         <context link="fund" field="org" />
8215                 </retrieve>
8216             </actions>
8217         </permacrud>
8218         </class>
8219
8220         <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">
8221                 <fields oils_persist:primary="fund">
8222                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8223                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8224                 </fields>
8225                 <links>
8226                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8227                 </links>
8228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8229             <actions>
8230                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8231                                         <context link="fund" field="org" />
8232                 </retrieve>
8233             </actions>
8234         </permacrud>
8235         </class>
8236
8237         <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">
8238                 <fields oils_persist:primary="fund">
8239                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8240                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8241                 </fields>
8242                 <links>
8243                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8244                 </links>
8245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8246             <actions>
8247                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8248                                         <context link="fund" field="org" />
8249                 </retrieve>
8250             </actions>
8251         </permacrud>
8252         </class>
8253
8254         <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">
8255                 <fields oils_persist:primary="fund">
8256                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8257                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8258                 </fields>
8259                 <links>
8260                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8261                 </links>
8262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8263             <actions>
8264                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8265                                         <context link="fund" field="org" />
8266                 </retrieve>
8267             </actions>
8268         </permacrud>
8269         </class>
8270
8271    <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">
8272         <fields oils_persist:primary="fund">
8273             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8274             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8275         </fields>
8276         <links>
8277             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8278         </links>
8279     </class>
8280
8281    <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">
8282         <fields oils_persist:primary="fund">
8283             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8284             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8285         </fields>
8286         <links>
8287             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8288         </links>
8289     </class>
8290
8291    <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">
8292         <fields oils_persist:primary="fund">
8293             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8294             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8295         </fields>
8296         <links>
8297             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8298         </links>
8299     </class>
8300
8301    <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">
8302         <fields oils_persist:primary="fund">
8303             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8304             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8305         </fields>
8306         <links>
8307             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8308         </links>
8309     </class>
8310
8311    <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">
8312         <fields oils_persist:primary="fund">
8313             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8314             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8315         </fields>
8316         <links>
8317             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8318         </links>
8319     </class>
8320
8321         <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">
8322                 <fields oils_persist:primary="funding_source">
8323                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8324                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8325                 </fields>
8326                 <links>
8327                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8328                 </links>
8329         </class>
8330
8331         <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">
8332                 <fields oils_persist:primary="funding_source">
8333                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8334                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8335                 </fields>
8336                 <links>
8337                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8338                 </links>
8339         </class>
8340
8341         <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">
8342                 <fields oils_persist:primary="funding_source">
8343                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8344                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8345                 </fields>
8346                 <links>
8347                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8348                 </links>
8349         </class>
8350
8351         <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">
8352                 <fields oils_persist:primary="fund">
8353                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8354                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8355                 </fields>
8356                 <links>
8357                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8358                 </links>
8359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8360             <actions>
8361                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8362                                         <context link="fund" field="org" />
8363                 </retrieve>
8364             </actions>
8365         </permacrud>
8366     </class>
8367     <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">
8368         <oils_persist:source_definition><![CDATA[
8369             SELECT
8370                 acqf.*,
8371                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8372                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8373                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8374                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8375             FROM
8376                 acq.fund acqf
8377                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8378                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8379                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8380                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8381         ]]></oils_persist:source_definition>
8382         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8383             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8384             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8385             <field reporter:label="Name" name="name" reporter:datatype="text" />
8386             <field reporter:label="Year" name="year" reporter:datatype="int" />
8387             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8388             <field reporter:label="Code" name="code" reporter:datatype="text" />
8389             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8390             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8391             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8392             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8393             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8394
8395             <!-- non fund-native fields -->
8396             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8397             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8398             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8399             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8400         </fields>
8401         <links>
8402             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8403             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8404             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8405         </links>
8406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8407             <actions>
8408                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8409             </actions>
8410         </permacrud>
8411         </class>
8412         <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">
8413                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8414                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8415                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8416                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8417                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8418                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8419                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8420                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8421                 </fields>
8422                 <links>
8423                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8424                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8425                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8426                 </links>
8427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8428                         <actions>
8429                                 <create permission="ADMIN_ACQ_FUND">
8430                     <context link="fund" field="org"/>
8431                 </create>
8432                                 <retrieve permission="ADMIN_ACQ_FUND">
8433                     <context link="fund" field="org"/>
8434                 </retrieve>
8435                                 <update permission="ADMIN_ACQ_FUND">
8436                     <context link="fund" field="org"/>
8437                 </update>
8438                                 <delete permission="ADMIN_ACQ_FUND">
8439                     <context link="fund" field="org"/>
8440                 </delete>
8441                         </actions>
8442                 </permacrud>
8443         </class>
8444
8445     <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">
8446         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8447             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8448             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8449             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8450             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8451             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8452             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8453             <field reporter:label="Note" name="note" reporter:datatype="text" />
8454             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8455         </fields>
8456         <links>
8457             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8458             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8459             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8460         </links>
8461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8462                         <actions>
8463                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8464                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8465                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8466                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8467                         </actions>
8468                 </permacrud>
8469     </class>
8470
8471         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8472                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8473                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8474                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8475                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8476                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8477                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8478                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8479                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8480                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8481                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8482                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8483                 </fields>
8484                 <links>
8485                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8486                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8487                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8488                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8489                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8490                 </links>
8491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8492                         <actions>
8493                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8494                         </actions>
8495                 </permacrud>
8496         </class>
8497
8498         <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">
8499                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8500                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8501                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8502                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8503                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8504                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8505                 </fields>
8506                 <links>
8507                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8508                 </links>
8509                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8510                         <actions>
8511                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8512                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8513                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8514                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8515                         </actions>
8516                 </permacrud>
8517         </class>
8518
8519         <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">
8520                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8521                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8522                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8523                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8524                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8525                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8526                         <field reporter:label="State" name="state" reporter:datatype="text" />
8527                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8528                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8529                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8530                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8531                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8532                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8533                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8534                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8535                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8536                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8537                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8538                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8539                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8540                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8541                 </fields>
8542                 <links>
8543                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8544                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8545                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8546                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8547                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8548                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8549                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8550                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8551                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8552                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8553                 </links>
8554                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8555                         <actions>
8556                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8557                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8558                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8559                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8560                         </actions>
8561                 </permacrud>
8562         </class>
8563
8564         <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">
8565                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8566                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8567                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8568                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8569                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8570                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8571                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8572                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8573                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8574                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8575                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8576                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8577                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8578                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8579                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8580                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8581                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8582                 </fields>
8583                 <links>
8584                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8585                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8586                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8587                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8588                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8589                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8590                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8591                 </links>
8592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8593             <actions>
8594                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8595             </actions>
8596                 </permacrud>
8597         </class>
8598
8599         <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">
8600                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8601                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8602                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8603                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8604                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8605                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8606                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8607                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8608                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8609                 </fields>
8610                 <links>
8611                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8612                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8613                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8614                 </links>
8615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8616             <actions>
8617                 <create permission="CREATE_PURCHASE_ORDER">
8618                     <context link="purchase_order" field="ordering_agency"/>
8619                 </create>
8620                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8621                     <context link="purchase_order" field="ordering_agency"/>
8622                 </retrieve>
8623                 <update permission="CREATE_PURCHASE_ORDER">
8624                     <context link="purchase_order" field="ordering_agency"/>
8625                 </update>
8626                 <delete permission="CREATE_PURCHASE_ORDER">
8627                     <context link="purchase_order" field="ordering_agency"/>
8628                 </delete>
8629             </actions>
8630                 </permacrud>
8631         </class>
8632
8633         <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">
8634                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8635                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8636                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8637                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8638                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8639                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8640                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8641                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8642                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8643                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8644                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8645                 </fields>
8646                 <links>
8647                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8648                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8649                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8650                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8651                 </links>
8652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8653             <actions>
8654                 <create permission="CREATE_PURCHASE_ORDER">
8655                     <context link="purchase_order" field="ordering_agency"/>
8656                 </create>
8657                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8658                     <context link="purchase_order" field="ordering_agency"/>
8659                 </retrieve>
8660                 <update permission="CREATE_PURCHASE_ORDER">
8661                     <context link="purchase_order" field="ordering_agency"/>
8662                 </update>
8663                 <delete permission="CREATE_PURCHASE_ORDER">
8664                     <context link="purchase_order" field="ordering_agency"/>
8665                 </delete>
8666             </actions>
8667                 </permacrud>
8668         </class>
8669
8670         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8671                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8672                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8673                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8674                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8675                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8676                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8677                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8678                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8679                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8680                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8681                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8682                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8683                         <field reporter:label="State" name="state" reporter:datatype="text" />
8684                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8685                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8686                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8687                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8688                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8689                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8690                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8691                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8692                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8693                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8694                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8695                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8696                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8697                 </fields>
8698                 <links>
8699                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8700                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8701                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8702                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8703                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8704                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8705                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8706                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8707                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8708                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8709                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8710                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8711                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8712                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8713                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8714                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8715                 </links>
8716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8717                         <actions>
8718                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8719                                         <context link="purchase_order" field="ordering_agency"/>
8720                                         <context link="picklist" field="org_unit"/>
8721                                 </retrieve>
8722                         </actions>
8723                 </permacrud>
8724         </class>
8725
8726         <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">
8727                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8728                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8729                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8730                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8731                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8732                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8733                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8734                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8735                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8736                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8737                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8738                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8739                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8740                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8741                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8742                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8743                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8744                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8745                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8746                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8747                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8748                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8749                 </fields>
8750                 <links>
8751                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8752                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8753                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8754                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8755                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8756                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8757                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8758                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8759                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8760                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8761                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8762                 </links>
8763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8764                         <actions>
8765                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8766                                         <context link="purchase_order" field="ordering_agency"/>
8767                                         <context link="picklist" field="org_unit"/>
8768                                 </retrieve>
8769                         </actions>
8770                 </permacrud>
8771         </class>
8772
8773         <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">
8774                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8775                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8776                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8777                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8778                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8779                 </fields>
8780                 <links>
8781                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8782                 </links>
8783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8784                         <actions>
8785                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8786                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8787                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8788                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8789                         </actions>
8790                 </permacrud>
8791         </class>
8792
8793         <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">
8794                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8795                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8796                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8797                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8798                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8799                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8800                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8801                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8802                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8803                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8804                 </fields>
8805                 <links>
8806                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8807                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8808                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8809                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8810                 </links>
8811         </class>
8812
8813         <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">
8814                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8815                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8816                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8817                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8818                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8819                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8820                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8821                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8822                 </fields>
8823                 <links>
8824                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8825                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8826                 </links>
8827         </class>
8828
8829         <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">
8830                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8831                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8832                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8833                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8834                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8835                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8836                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8837                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8838                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8839                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8840                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8841                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8842                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8843                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8844                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8845                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8846                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8847                 </fields>
8848                 <links>
8849                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8850                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8851                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8852                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8853                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8854                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8855                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8856                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8857                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8858                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8859                 </links>
8860         </class>
8861
8862         <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">
8863                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8864                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8865                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8866                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8867                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8868                 </fields>
8869                 <links/>
8870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8871                         <actions>
8872                                 <retrieve />
8873                         </actions>
8874                 </permacrud>
8875         </class>
8876
8877         <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">
8878                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8879                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8880                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8881                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8882                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8883                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8884             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8885                 </fields>
8886                 <links/>
8887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8888             <actions>
8889                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8890                 <retrieve />
8891                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8892                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8893             </actions>
8894         </permacrud>
8895         </class>
8896
8897         <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">
8898                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8899                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8900                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8901                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8902                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8903                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8904                 </fields>
8905                 <links/>
8906         </class>
8907         <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">
8908                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8909                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8910                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8911                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8912                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8913                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8914                 </fields>
8915                 <links>
8916                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8917                 </links>
8918         </class>
8919
8920         <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">
8921             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8922                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8923                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8924                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8925                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8926                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8927                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8928         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8929
8930             </fields>
8931             <links>
8932                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8933             </links>
8934             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8935                 <actions>
8936                     <create permission="ADMIN_PROVIDER">
8937                         <context link="provider" field="owner"/>
8938                     </create>
8939                     <retrieve permission="ADMIN_PROVIDER">
8940                         <context link="provider" field="owner"/>
8941                     </retrieve>
8942                     <update permission="ADMIN_PROVIDER">
8943                         <context link="provider" field="owner"/>
8944                     </update>
8945                     <delete permission="ADMIN_PROVIDER">
8946                         <context link="provider" field="owner"/>
8947                     </delete>
8948                 </actions>
8949             </permacrud>
8950         </class>
8951         
8952         <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">
8953             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8954                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8955                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8956                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8957                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8958             </fields>
8959             <links>
8960                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8961             </links>
8962             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8963                 <actions>
8964                     <create permission="ADMIN_PROVIDER">
8965                         <context link="provider" field="owner"/>
8966                     </create>
8967                     <retrieve permission="ADMIN_PROVIDER">
8968                         <context link="provider" field="owner"/>
8969                     </retrieve>
8970                     <update permission="ADMIN_PROVIDER">
8971                         <context link="provider" field="owner"/>
8972                     </update>
8973                     <delete permission="ADMIN_PROVIDER">
8974                         <context link="provider" field="owner"/>
8975                     </delete>
8976                 </actions>
8977             </permacrud>
8978         </class>
8979         
8980         <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">
8981             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8982                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8983                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8984                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8985                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8986                 </fields>
8987                 <links/>
8988         </class>
8989
8990         <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">
8991                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8992                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8993                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8994                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8995                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8996                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8997                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8998                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8999                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9000                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9001                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9002                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9003                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9004                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9005                 </fields>
9006                 <links>
9007                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9008                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9009                 </links>
9010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9011             <actions>
9012                 <create permission="ADMIN_PROVIDER">
9013                     <context link="provider" field="owner"/>
9014                 </create>
9015                 <retrieve permission="ADMIN_PROVIDER">
9016                     <context link="provider" field="owner"/>
9017                 </retrieve>
9018                 <update permission="ADMIN_PROVIDER">
9019                     <context link="provider" field="owner"/>
9020                 </update>
9021                 <delete permission="ADMIN_PROVIDER">
9022                     <context link="provider" field="owner"/>
9023                 </delete>
9024             </actions>
9025         </permacrud>
9026         </class>
9027
9028         <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">
9029                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9030                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9031                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9032                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9033                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9034                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9035                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9036                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9037                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9038                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9039                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9040                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9041                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9042                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9043                 </fields>
9044                 <links>
9045                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9046                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9047                 </links>
9048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9049             <actions>
9050                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9051                     <context link="account" jump="provider" field="owner"/>
9052                 </retrieve>
9053                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9054                     <context link="account" jump="provider" field="owner"/>
9055                 </update>
9056                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9057                     <context link="account" jump="provider" field="owner"/>
9058                 </delete>
9059             </actions>
9060         </permacrud>
9061         </class>
9062
9063
9064         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9065                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9066                         <field name="id" reporter:datatype="id" />
9067                         <field name="parent" reporter:datatype="link"/>
9068                         <field name="owner" reporter:datatype="link"/>
9069                         <field name="create_time" reporter:datatype="timestamp"/>
9070                         <field name="name" reporter:datatype="text"/>
9071                         <field name="shared" reporter:datatype="bool"/>
9072                         <field name="share_with" reporter:datatype="link"/>
9073                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9074                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9075                 </fields>
9076                 <links>
9077                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9078                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9079                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9080                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9081                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9082                 </links>
9083         </class>
9084         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9085                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9086                         <field name="id" reporter:datatype="id" />
9087                         <field name="parent" reporter:datatype="link"/>
9088                         <field name="owner" reporter:datatype="link"/>
9089                         <field name="create_time" reporter:datatype="timestamp"/>
9090                         <field name="name" reporter:datatype="text"/>
9091                         <field name="shared" reporter:datatype="bool"/>
9092                         <field name="share_with" reporter:datatype="link"/>
9093                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9094                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9095                 </fields>
9096                 <links>
9097                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9098                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9099                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9100                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9101                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9102                 </links>
9103         </class>
9104         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9105                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9106                         <field name="id" reporter:datatype="id" />
9107                         <field name="parent" reporter:datatype="link"/>
9108                         <field name="owner" reporter:datatype="link"/>
9109                         <field name="create_time" reporter:datatype="timestamp"/>
9110                         <field name="name" reporter:datatype="text"/>
9111                         <field name="shared" reporter:datatype="bool"/>
9112                         <field name="share_with" reporter:datatype="link"/>
9113                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9114                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9115                 </fields>
9116                 <links>
9117                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9118                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9119                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9120                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9121                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9122                 </links>
9123         </class>
9124         <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">
9125                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9126                         <field name="id" reporter:datatype="id" />
9127                         <field name="owner" reporter:datatype="link"/>
9128                         <field name="create_time" reporter:datatype="timestamp"/>
9129                         <field name="name" reporter:datatype="text"/>
9130                         <field name="data" reporter:datatype="text"/>
9131                         <field name="folder" reporter:datatype="link"/>
9132                         <field name="description" reporter:datatype="text"/>
9133                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9134                 </fields>
9135                 <links>
9136                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9137                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9138                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9139                 </links>
9140         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9141             <actions>
9142                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9143                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9144                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9145                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9146             </actions>
9147         </permacrud>
9148         </class>
9149         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9150                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9151                         <field name="id" reporter:datatype="id" />
9152                         <field name="owner" reporter:datatype="link"/>
9153                         <field name="create_time" reporter:datatype="timestamp"/>
9154                         <field name="template" reporter:datatype="link"/>
9155                         <field name="data" reporter:datatype="text"/>
9156                         <field name="folder" reporter:datatype="link"/>
9157                         <field name="recur" reporter:datatype="bool"/>
9158                         <field name="recurrence" reporter:datatype="interval"/>
9159                         <field name="name" reporter:datatype="text"/>
9160                         <field name="description" reporter:datatype="text"/>
9161                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9162                 </fields>
9163                 <links>
9164                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9165                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9166                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9167                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9168                 </links>
9169         </class>
9170         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9171                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9172                         <field name="id" reporter:datatype="id" />
9173                         <field name="runner" reporter:datatype="link"/>
9174                         <field name="start_time" reporter:datatype="timestamp"/>
9175                         <field name="complete_time" reporter:datatype="timestamp"/>
9176                         <field name="run_time" reporter:datatype="timestamp"/>
9177                         <field name="email" reporter:datatype="text"/>
9178                         <field name="excel_format" reporter:datatype="bool"/>
9179                         <field name="csv_format" reporter:datatype="bool"/>
9180                         <field name="html_format" reporter:datatype="bool"/>
9181                         <field name="error_code" reporter:datatype="int"/>
9182                         <field name="error_text" reporter:datatype="text"/>
9183                         <field name="report" reporter:datatype="link"/>
9184                         <field name="folder" reporter:datatype="link"/>
9185                         <field name="chart_pie" reporter:datatype="bool"/>
9186                         <field name="chart_bar" reporter:datatype="bool"/>
9187                         <field name="chart_line" reporter:datatype="bool"/>
9188                 </fields>
9189                 <links>
9190                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9191                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9192                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9193                 </links>
9194         </class>
9195         <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">
9196                 <fields oils_persist:primary="id">
9197                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9198                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9199                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9200                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9201                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9202                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9203                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9204                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9205                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9206                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9207                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9208                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9209                 </fields>
9210                 <links>
9211                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9212                 </links>
9213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9214                         <actions>
9215                                 <retrieve />
9216                         </actions>
9217                 </permacrud>
9218         </class>
9219         <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">
9220                 <fields oils_persist:primary="id">
9221                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9222                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9223                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9224                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9225                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9226                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9227                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9228                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9229                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9230                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9231                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9232                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9233                 </fields>
9234                 <links>
9235                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9236                 </links>
9237         </class>
9238         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9239                 <fields oils_persist:primary="id">
9240                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9241                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9242                         <field reporter:label="Fingerprint" name="fingerprint" />
9243                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9244                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9245                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9246                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9247                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9248                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9249                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9250                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9251                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9252                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9253                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9254                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9255                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9256                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9257                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9258                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9259                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9260                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9261                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9262                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9263                 </fields>
9264                 <links>
9265                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9266                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9267                 </links>
9268         </class>
9269         <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">
9270                 <fields oils_persist:primary="id">
9271                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9272                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9273                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9274                 </fields>
9275                 <links>
9276                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9277                 </links>
9278         </class>
9279         <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">
9280                 <fields oils_persist:primary="id">
9281                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9282                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9283                 </fields>
9284                 <links>
9285                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9286                 </links>
9287         </class>
9288         <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">
9289                 <fields oils_persist:primary="id">
9290                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9291                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9292                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9293                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9294                 </fields>
9295                 <links>
9296                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9297                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9298                 </links>
9299         </class>
9300         <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">
9301                 <fields oils_persist:primary="xact">
9302                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9303                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9304                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9305                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9306                 </fields>
9307                 <links>
9308                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9309                 </links>
9310         </class>
9311         <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">
9312                 <fields oils_persist:primary="xact">
9313                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9314                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9315                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9316                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9317                 </fields>
9318                 <links>
9319                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9320                 </links>
9321         </class>
9322         <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)">
9323                 <fields oils_persist:primary="id">
9324                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9325                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9326                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9327                 </fields>
9328                 <links>
9329                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9330                 </links>
9331         </class>
9332         <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">
9333                 <fields oils_persist:primary="id">
9334                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9335                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9336                 </fields>
9337                 <links>
9338                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9339                 </links>
9340         </class>
9341         <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">
9342                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9343                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9344                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9345                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9346                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9347                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9348                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9349                 </fields>
9350                 <links>
9351                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9352                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9353                 </links>
9354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9355                         <actions>
9356                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9357                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9358                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9359                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9360                         </actions>
9361                 </permacrud>
9362         </class>
9363         <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">
9364                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9365                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9366                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9367                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9368                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9369                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9370                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9371                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9372                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9373                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9374                 </fields>
9375                 <links>
9376                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9377                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9378                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9379                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9380                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9381                 </links>
9382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9383                         <actions>
9384                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9385                                         <context link="formula" field="owner"/>
9386                                 </create>
9387                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9388                                         <context link="formula" field="owner"/>
9389                                 </retrieve>
9390                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9391                                         <context link="formula" field="owner"/>
9392                                 </update>
9393                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9394                                         <context link="formula" field="owner"/>
9395                                 </delete>
9396                         </actions>
9397                 </permacrud>
9398         </class>
9399
9400         <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">
9401                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9402                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9403                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9404                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9405                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9406                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9407                 </fields>
9408                 <links>
9409                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9410                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9411                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9412                 </links>
9413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9414                         <actions>
9415                                 <create permission="CREATE_PURCHASE_ORDER">
9416                                         <context link="formula" field="owner"/>
9417                 </create>
9418                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9419                                         <context link="formula" field="owner"/>
9420                 </retrieve>
9421                                 <update permission="CREATE_PURCHASE_ORDER">
9422                                         <context link="formula" field="owner"/>
9423                 </update>
9424                                 <delete permission="CREATE_PURCHASE_ORDER">
9425                                         <context link="formula" field="owner"/>
9426                 </delete>
9427                         </actions>
9428                 </permacrud>
9429         </class>
9430
9431         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9432                 <fields oils_persist:primary="id">
9433                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9434                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9435                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9436                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9437                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9438                 </fields>
9439                 <links>
9440                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9441                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9442                 </links>
9443         </class>
9444
9445         <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">
9446                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9447                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9448                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9449                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9450                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9451                 </fields>
9452                 <links>
9453                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9454                 </links>
9455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9456                         <actions>
9457                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9458                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9459                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9460                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9461                         </actions>
9462                 </permacrud>
9463         </class>
9464
9465         <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">
9466                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9467                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9468                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9469                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9470                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9471                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9472                 </fields>
9473                 <links>
9474                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9475                 </links>
9476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9477                         <actions>
9478                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9479                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9480                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9481                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9482                         </actions>
9483                 </permacrud>
9484         </class>
9485
9486         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9488                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9489                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9490                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9491                 </fields>
9492                 <links>
9493                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9494                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9495                 </links>
9496         </class>
9497
9498         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9499                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9500                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9501                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9502                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9503                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9504                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9505                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9506                 </fields>
9507                 <links>
9508                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9509                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9510                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9511                 </links>
9512         </class>
9513
9514         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9515                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9516                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9517                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9518                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9519                 </fields>
9520                 <links>
9521                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9522                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9523                 </links>
9524         </class>
9525
9526         <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">
9527                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9528                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9529                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9530                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9531                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9532                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9533                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9534                 </fields>
9535                 <links>
9536                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9537                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9538                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9539                 </links>
9540         </class>
9541
9542         <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">
9543                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9544                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9545                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9546                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9547                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9548                 </fields>
9549                 <links>
9550                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9551                 </links>
9552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9553             <actions>
9554                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9555                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9556                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9557                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9558             </actions>
9559                 </permacrud>
9560         </class>
9561
9562         <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">
9563                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9564                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9565                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9566                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9567                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9568                 </fields>
9569                 <links>
9570                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9571                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9572                 </links>
9573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9574                         <actions>
9575                                 <create permission="ADMIN_CLAIM_POLICY">
9576                                         <context link="claim_policy" field="org_unit"/>
9577                 </create>
9578                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9579                                         <context link="claim_policy" field="org_unit"/>
9580                 </retrieve>
9581                                 <update permission="ADMIN_CLAIM_POLICY">
9582                                         <context link="claim_policy" field="org_unit"/>
9583                 </update>
9584                                 <delete permission="ADMIN_CLAIM_POLICY">
9585                                         <context link="claim_policy" field="org_unit"/>
9586                 </delete>
9587                         </actions>
9588                 </permacrud>
9589         </class>
9590
9591     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9592         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9593             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9594             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9595             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9596             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9597             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9598             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9599             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9600             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9601             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9602             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9603             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9604             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9605             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9606             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9607             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9608             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9609         </fields>
9610         <links>
9611             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9612         </links>
9613     </class>
9614
9615     <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">
9616         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9617             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9618             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9619             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9620             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9621             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9622         </fields>
9623     </class>
9624
9625     <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">
9626         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9627             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9628             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9629             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9630             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9631             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9632             <field reporter:label="City" name="city" reporter:datatype="text"/>
9633             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9634             <field reporter:label="State" name="state" reporter:datatype="text"/>
9635             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9636             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9637             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9638         </fields>
9639     </class>
9640
9641     <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">
9642         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9643             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9644             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9645             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9646             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9647             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9648             <field reporter:label="City" name="city" reporter:datatype="text"/>
9649             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9650             <field reporter:label="State" name="state" reporter:datatype="text"/>
9651             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9652             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9653             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9654         </fields>
9655     </class>
9656
9657     <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">
9658         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9659             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9660             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9661             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9662             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9663             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9664             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9665         </fields>
9666     </class>
9667
9668     <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">
9669         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9670             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9671             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9672             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9673             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9674             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9675             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9676         </fields>
9677     </class>
9678
9679         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9680                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9681                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9682                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9683                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9684                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9685                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9686                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9687                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9688                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9689                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9690                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9691                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9692                 </fields>
9693                 <links>
9694                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9695                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9696                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9697                 </links>
9698         </class>
9699
9700         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9701                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9702                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9703                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9704                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9705                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9706                 </fields>
9707                 <links>
9708                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9709                 </links>
9710         </class>
9711
9712     <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">
9713         <fields>
9714             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9715             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9716             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9717         </fields>
9718                 <links>
9719                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9720                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9721                 </links>
9722     </class>
9723
9724     <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">
9725         <fields>
9726             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9727             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9728         </fields>
9729                 <links>
9730                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9731                 </links>
9732     </class>
9733
9734     <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">
9735         <fields>
9736             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9737             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9738             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9739         </fields>
9740                 <links>
9741                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9742                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9743                 </links>
9744     </class>
9745
9746     <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">
9747         <fields>
9748             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9749             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9750         </fields>
9751                 <links>
9752                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9753                 </links>
9754     </class>
9755
9756     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9757                 <oils_persist:source_definition>
9758
9759             SELECT  DISTINCT l.*
9760               FROM  action.unfulfilled_hold_loops l
9761                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9762               WHERE l.count = m.max
9763
9764                 </oils_persist:source_definition>
9765         <fields>
9766             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9767             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9768             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9769         </fields>
9770                 <links>
9771                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9772                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9773                 </links>
9774     </class>
9775
9776         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9777                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9778                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9779                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9780                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9781                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9782                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9783                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9784                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9785                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9786                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9787                 </fields>
9788                 <links>
9789                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9790                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9791                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9792                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9793                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9794                 </links>
9795         </class>
9796
9797         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9798                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9799                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9800                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9801                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9802                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9803                 </fields>
9804                 <links>
9805                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9806                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9807                 </links>
9808         </class>
9809
9810         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9811                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9812                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9813                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9814                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9815                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9816                 </fields>
9817                 <links>
9818                 </links>
9819         </class>
9820
9821         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9822                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9823                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9824                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9825                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9826                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9827                 </fields>
9828                 <links>
9829                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9830                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9831                 </links>
9832         </class>
9833         
9834         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9835                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9836                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9837                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9838                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9839                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9840                 </fields>
9841                 <links>
9842                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9843                 </links>
9844         </class>
9845         
9846         <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">
9847                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9848                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9849                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9850                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9851                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9852                 </fields>
9853                 <links>
9854                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9855                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9856                 </links>
9857         </class>
9858
9859         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9860                 <fields oils_persist:primary="name">
9861                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9862                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9863                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9864                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9865                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9866                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9867                 </fields>
9868                 <links>
9869                 </links>
9870         </class>
9871
9872         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9873                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9874                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9875                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9876                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9877                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9878                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9879                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9880                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9881                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9882                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9883                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9884                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9885                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9886                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9887                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9888                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9889                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9890                 </fields>
9891                 <links>
9892                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9893                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9894                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9895                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9896                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9897                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9898                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9899                 </links>
9900         </class>
9901
9902         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9903                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9904                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9905                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9906                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9907                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9908                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9909                 </fields>
9910                 <links>
9911                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9912                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9913                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9914                 </links>
9915         </class>
9916
9917         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9918                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9919                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9920                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9921                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9922                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9923                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9924                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9925                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9926                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9927                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9928                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9929                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9930                 </fields>
9931                 <links>
9932                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9933                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9934                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9935                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9936                 </links>
9937         </class>
9938
9939         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9940                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9941                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9942                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9943                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9944                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9945                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9946                 </fields>
9947                 <links>
9948                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9949                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9950                 </links>
9951         </class>
9952
9953         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9954                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9955                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9956                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9957                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9958                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9959                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9960                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9961                 </fields>
9962                 <links>
9963                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9964                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9965                 </links>
9966         </class>
9967
9968         <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">
9969                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9970                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9971                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9972                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9973                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9974                 </fields>
9975                 <links>
9976                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9977                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9978                 </links>
9979         </class>
9980
9981         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9982                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9983                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9984                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9985                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9986                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9987                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9988                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9989                 </fields>
9990                 <links>
9991                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9992                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9993                 </links>
9994         </class>
9995
9996         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9997                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9998                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9999                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10000                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10001                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10002                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10003                 </fields>
10004                 <links>
10005                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10006                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10007                 </links>
10008         </class>
10009
10010         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10011                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10012                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10013                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10014                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10015                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10016                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10017                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10018                 </fields>
10019                 <links>
10020                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10021                 </links>
10022         </class>
10023
10024         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10025                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10026                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10027                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10028                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10029                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10030                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10031                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10032                 </fields>
10033                 <links>
10034                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10035                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10036                 </links>
10037         </class>
10038
10039         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10040                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10041                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10042                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10043                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10044                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10045                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10046                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10047                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10048                 </fields>
10049                 <links>
10050                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10051                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10052                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10053                 </links>
10054         </class>
10055
10056         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10057                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10058                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10059                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10060                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10061                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10062                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10063                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10064                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10065                 </fields>
10066                 <links>
10067                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10068                 </links>
10069         </class>
10070
10071         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10072                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10073                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10074                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10075                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10076                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10077                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10078                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10079                 </fields>
10080                 <links>
10081                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10082                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10083                 </links>
10084         </class>
10085
10086         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10087                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10088                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10089                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10090                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10091                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10092                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10093                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10094                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10095                 </fields>
10096                 <links>
10097                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10098                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10099                 </links>
10100         </class>
10101
10102         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10103                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10104                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10105                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10106                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10107                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10108                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10109                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10110                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10111                 </fields>
10112                 <links>
10113                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10114                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10115                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10116                 </links>
10117         </class>
10118
10119         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10120                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10121                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10122                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10123                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10124                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10125                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10126                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10127                 </fields>
10128                 <links>
10129                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10130                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10131                 </links>
10132         </class>
10133
10134         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10135                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10136                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10137                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10138                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10139                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10140                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10141                 </fields>
10142                 <links>
10143                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10144                 </links>
10145         </class>
10146
10147         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10148                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10149                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10150                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10151                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10152                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10153                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10154                 </fields>
10155                 <links>
10156                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10157                 </links>
10158         </class>
10159
10160         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10161                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10162                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10163                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10164                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10165                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10166                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10167                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10168                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10169                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10170                 </fields>
10171                 <links>
10172                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10173                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10174                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10175                 </links>
10176         </class>
10177
10178         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10179                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10180                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10181                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10182                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10183                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10184                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10185                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10186                 </fields>
10187                 <links>
10188                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10189                 </links>
10190         </class>
10191
10192         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10193                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10194                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10195                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10196                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10197                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10198                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10199                 </fields>
10200                 <links>
10201                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10202                 </links>
10203         </class>
10204
10205         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10206                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10207                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10208                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10209                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10210                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10211                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10212                 </fields>
10213                 <links>
10214                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10215                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10216                 </links>
10217         </class>
10218
10219         <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">
10220                 <fields oils_persist:primary="id">
10221                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10222                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10223                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10224                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10225                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10226                 </fields>
10227                 <links>
10228                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10229                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10230                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10231                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10232                 </links>
10233         </class>
10234
10235         <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">
10236                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10237                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10238                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10239                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10240                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10241                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10242                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10243                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10244                 </fields>
10245                 <links/>
10246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10247                         <actions>
10248                                 <retrieve/>
10249                         </actions>
10250                 </permacrud>
10251         </class>
10252
10253         <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">
10254                 <fields oils_persist:primary="ptype_key">
10255                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10256                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10257                 </fields>
10258                 <links/>
10259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10260                         <actions>
10261                                 <retrieve/>
10262                         </actions>
10263                 </permacrud>
10264         </class>
10265
10266         <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">
10267                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10268                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10269                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10270                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10271                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10272                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10273                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10274                 </fields>
10275                 <links>
10276                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10277                 </links>
10278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10279                         <actions>
10280                                 <retrieve/>
10281                         </actions>
10282                 </permacrud>
10283         </class>
10284
10285         <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">
10286                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10287                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10288                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10289                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10290                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10291                 </fields>
10292                 <links>
10293                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10294                 </links>
10295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10296                         <actions>
10297                                 <retrieve/>
10298                         </actions>
10299                 </permacrud>
10300         </class>
10301
10302     <class
10303         id="uvs"
10304         controller="open-ils.cstore open-ils.pcrud"
10305         oils_obj:fieldmapper="url_verify::session"
10306         oils_persist:tablename="url_verify.session"
10307         reporter:label="URL Verification Session"
10308     >
10309         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10310             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10311             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10312                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10313             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10314             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10315             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10316             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10317             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10318             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10319         </fields>
10320
10321         <links>
10322             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10323             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10324             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10325             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10326             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10327         </links>
10328
10329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10330             <actions>
10331                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10332             </actions>
10333         </permacrud>
10334
10335     </class>
10336
10337     <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">
10338         <oils_persist:source_definition>
10339             SELECT
10340                 cbrebi.id AS id,  -- so we can have a pkey in our view
10341                 uvs.id AS session,
10342                 uvs.owning_lib,
10343                 cbrebi.target_biblio_record_entry
10344             FROM url_verify.session uvs
10345             JOIN container.biblio_record_entry_bucket cbreb
10346                 ON (uvs.container = cbreb.id)
10347             JOIN container.biblio_record_entry_bucket_item cbrebi
10348                 ON (cbrebi.bucket = cbreb.id)
10349         </oils_persist:source_definition>
10350         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10351             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10352             <field reporter:label="Session" name="session" reporter:datatype="link" />
10353             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10354             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10355         </fields>
10356         <links>
10357             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10358             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10359             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10360         </links>
10361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10362             <actions>
10363                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10364             </actions>
10365         </permacrud>
10366     </class>
10367
10368     <class
10369         id="uvus"
10370         controller="open-ils.cstore open-ils.pcrud"
10371         oils_obj:fieldmapper="url_verify::url_selector"
10372         oils_persist:tablename="url_verify.url_selector"
10373         reporter:label="URL Verification URL Selector"
10374     >
10375         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10376             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10377             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10378                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10379             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10380         </fields>
10381
10382         <links>
10383             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10384             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10385         </links>
10386
10387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10388             <actions>
10389                 <create permission="URL_VERIFY">
10390                     <context link="session" field="owning_lib"/>
10391                 </create>
10392                 <retrieve permission="URL_VERIFY">
10393                     <context link="session" field="owning_lib"/>
10394                 </retrieve>
10395                 <update permission="URL_VERIFY">
10396                     <context link="session" field="owning_lib"/>
10397                 </update>
10398                 <delete permission="URL_VERIFY">
10399                     <context link="session" field="owning_lib"/>
10400                 </delete>
10401             </actions>
10402         </permacrud>
10403
10404     </class>
10405
10406     <class
10407         id="uvu"
10408         controller="open-ils.cstore open-ils.pcrud"
10409         oils_obj:fieldmapper="url_verify::url"
10410         oils_persist:tablename="url_verify.url"
10411         reporter:label="URL Verification URL"
10412     >
10413         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10414             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10415                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10416                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10417                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10418                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10419             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10420             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10421             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10422             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10423             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10424             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10425             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10426             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10427             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10428             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10429             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10430             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10431             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10432         </fields>
10433
10434         <links>
10435             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10436             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10437             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10438             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10439             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10440         </links>
10441
10442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10443             <actions>
10444                 <create permission="URL_VERIFY">
10445                     <context link="session" field="owning_lib"/>
10446                 </create>
10447                 <retrieve permission="URL_VERIFY">
10448                     <context link="session" field="owning_lib"/>
10449                 </retrieve>
10450                 <update permission="URL_VERIFY">
10451                     <context link="session" field="owning_lib"/>
10452                 </update>
10453                 <delete permission="URL_VERIFY">
10454                     <context link="session" field="owning_lib"/>
10455                 </delete>
10456             </actions>
10457         </permacrud>
10458
10459     </class>
10460
10461     <class
10462         id="uvva"
10463         controller="open-ils.cstore open-ils.pcrud"
10464         oils_obj:fieldmapper="url_verify::verification_attempt"
10465         oils_persist:tablename="url_verify.verification_attempt"
10466         reporter:label="URL Verification Attempt"
10467     >
10468         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10469             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10470                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10471                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10472             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10473             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10474         </fields>
10475
10476         <links>
10477             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10478             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10479         </links>
10480
10481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10482             <actions>
10483                 <create permission="URL_VERIFY">
10484                     <context link="session" field="owning_lib"/>
10485                 </create>
10486                 <retrieve permission="URL_VERIFY">
10487                     <context link="session" field="owning_lib"/>
10488                 </retrieve>
10489                 <update permission="URL_VERIFY">
10490                     <context link="session" field="owning_lib"/>
10491                 </update>
10492                 <delete permission="URL_VERIFY">
10493                     <context link="session" field="owning_lib"/>
10494                 </delete>
10495             </actions>
10496         </permacrud>
10497
10498     </class>
10499
10500     <class
10501         id="uvuv"
10502         controller="open-ils.cstore open-ils.pcrud"
10503         oils_obj:fieldmapper="url_verify::url_verification"
10504         oils_persist:tablename="url_verify.url_verification"
10505         reporter:label="URL Verification"
10506     >
10507         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10508             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10509                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10510                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10511             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10512             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10513             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10514             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10515                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10516         </fields>
10517
10518         <links>
10519             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10520             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10521             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10522         </links>
10523
10524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10525             <actions>
10526                 <create permission="URL_VERIFY">
10527                     <context link="attempt" jump="session" field="owning_lib"/>
10528                 </create>
10529                 <retrieve permission="URL_VERIFY">
10530                     <context link="attempt" jump="session" field="owning_lib"/>
10531                 </retrieve>
10532                 <update permission="URL_VERIFY">
10533                     <context link="attempt" jump="session" field="owning_lib"/>
10534                 </update>
10535                 <delete permission="URL_VERIFY">
10536                     <context link="attempt" jump="session" field="owning_lib"/>
10537                 </delete>
10538             </actions>
10539         </permacrud>
10540
10541     </class>
10542
10543         <class
10544                 id="cfdi"
10545                 controller="open-ils.cstore open-ils.pcrud"
10546                 oils_obj:fieldmapper="config::filter_dialog_interface"
10547                 oils_persist:tablename="config.filter_dialog_interface"
10548                 reporter:label="FilterDialog Interface">
10549                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10550                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10551                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10552                 </fields>
10553                 <links>
10554                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10555                 </links>
10556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10557                         <actions>
10558                                 <retrieve />
10559                         </actions>
10560                 </permacrud>
10561         </class>
10562
10563         <class
10564                 id="cfdfs"
10565                 controller="open-ils.cstore open-ils.pcrud"
10566                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10567                 oils_persist:tablename="config.filter_dialog_filter_set"
10568                 reporter:label="FilterDialog Filter Set">
10569                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10570                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10571                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10572                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10573                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10574                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10575                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10576                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10577                 </fields>
10578                 <links>
10579                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10580                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10581                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10582                 </links>
10583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10584                         <actions>
10585                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10586                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10587                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10588                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10589                         </actions>
10590                 </permacrud>
10591
10592         </class>
10593
10594         <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">
10595                 <fields oils_persist:primary="code">
10596                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10597                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10598                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10599                 </fields>
10600                 <links/>
10601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10602                         <actions>
10603                                 <retrieve/>
10604                         </actions>
10605                 </permacrud>
10606         </class>
10607
10608         <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">
10609                 <oils_persist:source_definition>
10610
10611             SELECT  b.id,
10612                     MAX(dcp.edit_date) AS last_delete_date
10613              FROM   biblio.record_entry b
10614                     JOIN asset.call_number cn ON (cn.record = b.id)
10615                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10616              WHERE  NOT b.deleted
10617              GROUP BY b.id
10618              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10619
10620                 </oils_persist:source_definition>
10621                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10622                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10623                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10624                 </fields>
10625                 <links>
10626                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10627                 </links>
10628                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10629                         <actions>
10630                                 <retrieve/>
10631                         </actions>
10632                 </permacrud>
10633         </class>
10634
10635         <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">
10636                 <oils_persist:source_definition>
10637
10638             -- -- 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.
10639             -- -- 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
10640             -- -- may not.
10641             -- SELECT
10642             --     bre.id AS bib_id,
10643             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10644             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10645             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10646             -- FROM (
10647                 SELECT
10648                     y.bre AS id,
10649                     COALESCE( x.copy_count, 0 ) AS copy_count,
10650                     y.hold_count AS hold_count,
10651                     (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
10652                 FROM (
10653                         SELECT
10654                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10655                             COUNT(*) AS hold_count
10656                         FROM action.hold_request h
10657                         WHERE
10658                             cancel_time IS NULL
10659                             AND fulfillment_time IS NULL
10660                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10661                         GROUP BY 1
10662                     )y LEFT JOIN (
10663                         SELECT 
10664                             (SELECT id
10665                                 FROM biblio.record_entry 
10666                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10667                             ) AS bre, 
10668                             COUNT(*) AS copy_count
10669                         FROM asset.copy
10670                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10671                         WHERE copy.holdable 
10672                             AND NOT copy.deleted 
10673                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10674                         GROUP BY 1
10675                     )x ON x.bre = y.bre
10676                 -- )z RIGHT JOIN (
10677                 --     SELECT id
10678                 --     FROM biblio.record_entry
10679                 --     WHERE NOT deleted
10680                 -- )bre ON (z.bib_id = bre.id)
10681                 
10682
10683                 </oils_persist:source_definition>
10684                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10685                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10686                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10687                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10688                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10689                 </fields>
10690                 <links>
10691                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10692                 </links>
10693                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10694                         <actions>
10695                                 <retrieve/>
10696                         </actions>
10697                 </permacrud>
10698         </class>
10699
10700         <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">
10701                 <oils_persist:source_definition>
10702             SELECT *,
10703                 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,
10704                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10705             FROM
10706                 (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
10707                     FROM
10708                         action.hold_request ahr
10709                         JOIN reporter.hold_request_record rhrr USING (id)
10710                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10711                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10712                     WHERE
10713                         ahr.cancel_time IS NULL
10714                         AND ahr.fulfillment_time IS NULL
10715                     GROUP BY bib_record, pickup_lib
10716                 )x
10717                 JOIN
10718                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10719                     FROM
10720                         action.hold_request ahr
10721                         JOIN reporter.hold_request_record rhrr USING (id)
10722                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10723                     WHERE
10724                         ahr.cancel_time IS NULL
10725                         AND ahr.fulfillment_time IS NULL
10726                     GROUP BY bib_record
10727                 )y
10728                 USING (id)
10729                 </oils_persist:source_definition>
10730                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10731                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10732                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10733                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10734                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10735                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10736                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10737                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10738                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10739                 </fields>
10740                 <links>
10741                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10742                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10743                 </links>
10744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10745                         <actions>
10746                                 <retrieve/>
10747                         </actions>
10748                 </permacrud>
10749         </class>
10750
10751         <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) ">
10752                 <oils_persist:source_definition>
10753             WITH counts_at_ou AS (
10754                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10755                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10756                 FROM action.hold_request ahr
10757                 JOIN reporter.hold_request_record rhrr USING (id)
10758                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10759                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10760                 WHERE ahr.cancel_time IS NULL
10761                 AND ahr.fulfillment_time IS NULL
10762                 GROUP BY bib_record, pickup_lib
10763             )
10764             SELECT *,
10765                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE holds_at_or_below::FLOAT/copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
10766                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10767             FROM
10768                 (SELECT bib_record AS id, aou.id AS pickup_lib_or_desc, SUM(holds_at_pickup_library) AS holds_at_or_below, SUM(copy_count_at_pickup_library) AS copy_count_at_or_below
10769                 FROM actor.org_unit aou
10770                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10771                 GROUP BY bib_record, pickup_lib_or_desc
10772                 )x
10773                 JOIN
10774                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10775                     FROM
10776                         action.hold_request ahr
10777                         JOIN reporter.hold_request_record rhrr USING (id)
10778                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10779                     WHERE
10780                         ahr.cancel_time IS NULL
10781                         AND ahr.fulfillment_time IS NULL
10782                     GROUP BY bib_record
10783                 )y
10784                 USING (id)
10785                 </oils_persist:source_definition>
10786                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10787                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10788                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10789                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10790                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10791                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10792                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10793                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10794                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10795                 </fields>
10796                 <links>
10797                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10798                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10799                 </links>
10800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10801                         <actions>
10802                                 <retrieve/>
10803                         </actions>
10804                 </permacrud>
10805         </class>
10806
10807         <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">
10808                 <oils_persist:source_definition>
10809             SELECT
10810                 ac.id,
10811                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10812                 MAX(actac.xact_start) AS last_circ
10813             FROM asset.copy ac
10814                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10815             GROUP BY ac.id
10816
10817             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10818             --SELECT
10819             --    ac.id,
10820             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10821             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10822             --FROM asset.copy ac
10823             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10824             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10825             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10826                 </oils_persist:source_definition>
10827                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10828                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10829                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10830                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10831                 </fields>
10832                 <links>
10833                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10834                 </links>
10835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10836                         <actions>
10837                                 <retrieve/>
10838                         </actions>
10839                 </permacrud>
10840         </class>
10841
10842         <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">
10843                 <fields oils_persist:primary="id">
10844                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10845                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10846                 </fields>
10847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10848                         <actions>
10849                                 <retrieve/>
10850                         </actions>
10851                 </permacrud>
10852         </class>
10853
10854         <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">
10855                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10856                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10857                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10858                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10859                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10860                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10861                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10862                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10863                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10864                 </fields>
10865                 <links>
10866                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10867                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10868                 </links>
10869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10870                         <actions>
10871                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10872                                 <retrieve/>
10873                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10874                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10875                         </actions>
10876                 </permacrud>
10877         </class>
10878
10879         <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">
10880                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10881                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10882                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10883                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10884                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10885                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10886                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10887                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10888                 </fields>
10889                 <links>
10890                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10891                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10892                 </links>
10893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10894                         <actions>
10895                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10896                                 <retrieve/>
10897                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10898                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10899                         </actions>
10900                 </permacrud>
10901         </class>
10902
10903
10904         <!-- ********************************************************************************************************************* -->
10905         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10906         <!-- ********************************************************************************************************************* -->
10907         <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">
10908                 <fields oils_persist:primary="id">
10909                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10910                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10911                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10912                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10913                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10914                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10915                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10916                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10917                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10918                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10919                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10920                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10921                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10922                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10923                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10924                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10925                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10926                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10927                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10928                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10929                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10930                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10931                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10932                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10933                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10934                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10935                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10936                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10937                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10938                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10939                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10940                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10941                 </fields>
10942                 <links>
10943                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10944                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10945                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10946                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10947                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10948                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10949                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10950                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10951                 </links>
10952         </class>
10953
10954         <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">
10955                 <fields oils_persist:primary="id">
10956                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10957                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10958                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10959                 </fields>
10960                 <links>
10961                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10962                 </links>
10963         </class>
10964
10965         <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">
10966                 <fields oils_persist:primary="id">
10967                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10968                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10969                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10970                 </fields>
10971                 <links>
10972                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10973                 </links>
10974         </class>
10975
10976         <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">
10977                 <fields oils_persist:primary="id">
10978                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10979
10980                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10981                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10982                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10983
10984                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10985                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10986                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10987
10988                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10989                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10990
10991                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10992                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10993                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10994
10995                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10996                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10997
10998                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10999                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11000                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11001
11002                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11003                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11004                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11005
11006                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11007                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11008                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11009                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11010
11011                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11012                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11013
11014                 </fields>
11015                 <links>
11016                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11017                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11018                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11019                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11020                 </links>
11021         </class>
11022
11023         <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">
11024                 <oils_persist:source_definition>
11025
11026             SELECT
11027                 po.ordering_agency AS ordering_agency,
11028                 po.id AS purchase_order,
11029                 li.id AS lineitem,
11030                 lid.id AS lineitem_detail,
11031                 cpa.id AS claim_policy_action
11032             FROM
11033                 acq.lineitem_detail lid
11034                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11035                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11036                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11037                 JOIN acq.claim_policy_action cpa ON (
11038                     cpa.claim_policy = cp.id
11039
11040                     -- we only care about claim policy actions whose claim
11041                     -- interval we'd reached or exceeded
11042                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11043
11044                     -- filter out all claim policy actions where claim events
11045                     -- have occurred on or after the action's action_interval
11046                     AND NOT EXISTS (
11047                         SELECT 1
11048                         FROM
11049                             acq.claim_event evt
11050                             JOIN acq.claim claim ON (
11051                                 claim.id = evt.claim
11052                                 AND claim.lineitem_detail = lid.id
11053                             )
11054                         WHERE
11055                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11056                     )
11057                 )
11058             WHERE
11059                 lid.cancel_reason IS NULL
11060                 AND li.cancel_reason IS NULL -- belt/suspenders
11061                 AND po.cancel_reason IS NULL -- belt/suspenders
11062                 AND lid.recv_time IS NULL
11063                 AND po.state = 'on-order'
11064             ORDER BY 1, 2, 3, 4, 5
11065
11066                 </oils_persist:source_definition>
11067                 <fields>
11068                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11069                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11070                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11071                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11072                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11073                 </fields>
11074                 <links>
11075                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11076                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11077                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11078                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11079                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11080                 </links>
11081         </class>
11082         <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">
11083                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11084                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11085                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11086                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11087                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11088                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11089                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11090                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11091                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11092                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11093                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11094                 </fields>
11095                 <links>
11096                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11097                 </links>
11098     </class>
11099         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11100                 <oils_persist:source_definition>
11101             SELECT * FROM acq.lineitem_summary 
11102                                 WHERE item_count > (invoice_count + cancel_count)
11103         </oils_persist:source_definition>
11104                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11105                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11106                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11107                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11108                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11109                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11110                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11111                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11112                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11113                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11114                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11115                 </fields>
11116                 <links>
11117                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11118                 </links>
11119     </class>
11120         <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">
11121                 <oils_persist:source_definition>
11122
11123                         SELECT  t.*
11124                           FROM  action.transit_copy t
11125                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11126                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11127                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11128
11129                 </oils_persist:source_definition>
11130                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11131                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11132                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11133                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11134                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11135                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11136                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11137                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11138                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11139                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11140                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11141                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11142                 </fields>
11143                 <links>
11144                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11145                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11146                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11147                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11148                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11149                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11150                 </links>
11151         </class>
11152
11153     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11154                 <oils_persist:source_definition>
11155
11156         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11157                 SELECT
11158                         cp.id as copy,
11159                         COUNT(circ.id),
11160                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11161                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11162                 FROM
11163                         asset.copy cp
11164                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11165                 GROUP BY 1, 3, 4
11166                 UNION ALL
11167                 SELECT
11168                         cp.id as copy,
11169                         COUNT(circ.id),
11170                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11171                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11172                 FROM
11173                         asset.copy cp
11174                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11175                 GROUP BY 1, 3, 4
11176                 UNION ALL
11177                 SELECT
11178                         id as copy,
11179                         circ_count,
11180                         -1 AS year,
11181                         false as is_renewal
11182                 FROM
11183                         extend_reporter.legacy_circ_count
11184         )x GROUP BY 1, 3, 4
11185
11186                 </oils_persist:source_definition>
11187         <fields>
11188             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11189             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11190             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11191             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11192         </fields>
11193                 <links>
11194                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11195                 </links>
11196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11197                         <actions>
11198                                 <retrieve/>
11199                         </actions>
11200                 </permacrud>
11201     </class>
11202
11203         <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">
11204                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11205                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11206                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11207                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11208                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11209                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11210                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11211                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11212                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11213                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11214                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11215                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11216                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11217                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11218                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11219                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11220                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11221                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11222                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11223                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11224                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11225                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11226                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11227                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11228                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11229                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11230                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11231                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11232                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11233                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11234                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11235                 </fields>
11236                 <links>
11237                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11238                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11239                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11240                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11241                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11242                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11243                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11244                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11245                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11246                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11247                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11248                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11249                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11250                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11251                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11252                 </links>
11253         </class>
11254
11255     <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">
11256         <fields oils_persist:primary="id">
11257             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11258             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11259             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11260             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11261             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11262             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11263             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11264             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11265             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11266             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11267             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11268             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11269             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11270             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11271             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11272             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11273             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11274             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11275             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11276             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11277             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11278             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11279             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11280             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11281             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11282             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11283             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11284             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11285             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11286             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11287             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11288             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11289             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11290             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11291         </fields>
11292         <links>
11293             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11294             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11295             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11296             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11297             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11298             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11299             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11300             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11301         </links>
11302     </class>
11303
11304     <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">
11305         <fields oils_persist:primary="id">
11306             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11307             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11308             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11309             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11310         </fields>
11311         <links>
11312             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11313             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11314         </links>
11315     </class>
11316
11317     <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">
11318         <fields oils_persist:primary="owning_lib">
11319             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11320             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11321             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11322         </fields>
11323         <links>
11324             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11325         </links>
11326     </class>
11327
11328     <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">
11329         <fields oils_persist:primary="id">
11330             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11331             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11332             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11333             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11334             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11335         </fields>
11336         <links>
11337             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11338             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11339             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11340         </links>
11341     </class>
11342
11343     <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">
11344         <fields oils_persist:primary="circ_lib">
11345             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11346             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11347             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11348             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11349         </fields>
11350         <links>
11351             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11352             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11353         </links>
11354     </class>
11355
11356     <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">
11357         <fields oils_persist:primary="id">
11358             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11359             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11360             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11361             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11362             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11363         </fields>
11364         <links>
11365             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11366             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11367             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11368         </links>
11369     </class>
11370
11371     <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">
11372         <fields oils_persist:primary="home_ou">
11373             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11374             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11375             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11376             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11377         </fields>
11378         <links>
11379             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11380             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11381         </links>
11382     </class>
11383         <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">
11384                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11385                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11386                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11387                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11388                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11389                 </fields>
11390                 <links>
11391                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11392                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11393                 </links>
11394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11395                         <actions>
11396                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11397                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11398                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11399                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11400                         </actions>
11401                 </permacrud>
11402         </class>
11403         <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">
11404                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11405                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11406                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11407                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11408                 </fields>
11409                 <links>
11410                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11411                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11412                         </links>
11413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11414                 <actions>
11415                                 <create permission="ADMIN_ACQ_FUND_TAG">
11416                                         <context link="tag" field="owner"/>
11417                                 </create>
11418                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11419                                         <context link="tag" field="owner"/>
11420                                 </retrieve>
11421                                 <update permission="ADMIN_ACQ_FUND_TAG">
11422                                         <context link="tag" field="owner"/>
11423                                 </update>
11424                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11425                                         <context link="tag" field="owner"/>
11426                                 </delete>
11427                         </actions>
11428                 </permacrud>
11429         </class>
11430         <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">
11431                 <oils_persist:source_definition><![CDATA[
11432                 SELECT
11433                         poi.purchase_order AS purchase_order,
11434                         ii.invoice AS invoice,
11435                         NULL AS lineitem,
11436                         poi.id AS po_item,
11437                         NULL AS picklist
11438                 FROM
11439                         acq.po_item poi
11440                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11441                 UNION SELECT
11442                         jub.purchase_order AS purchase_order,
11443                         ie.invoice AS invoice,
11444                         jub.id AS lineitem,
11445                         NULL AS po_item,
11446                         jub.picklist AS picklist
11447                 FROM
11448                         acq.lineitem jub
11449                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11450                 UNION SELECT
11451                         ii.purchase_order AS purchase_order,
11452                         ii.invoice AS invoice,
11453                         NULL AS lineitem,
11454                         NULL AS po_item,
11455                         NULL AS picklist
11456                 FROM
11457                         acq.invoice_item ii
11458                 WHERE ii.po_item IS NULL
11459                 UNION SELECT
11460                         ie.purchase_order AS purchase_order,
11461                         ie.invoice AS invoice,
11462                         NULL AS lineitem,
11463                         NULL AS po_item,
11464                         NULL AS picklist
11465                 FROM
11466                         acq.invoice_entry ie
11467                 WHERE ie.lineitem IS NULL
11468                 UNION SELECT
11469                         NULL AS purchase_order,
11470                         NULL AS invoice,
11471                         jub.id AS lineitem,
11472                         NULL AS po_item,
11473                         jub.picklist AS picklist
11474                 FROM
11475                         acq.lineitem jub
11476                 WHERE jub.purchase_order IS NULL
11477                 ]]></oils_persist:source_definition>
11478                 <fields>
11479                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11480                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11481                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11482                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11483                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11484                 </fields>
11485                 <links>
11486                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11487                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11488                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11489                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11490                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11491                 </links>
11492         </class>
11493         <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">
11494                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11495                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11496                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11497                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11498                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11499                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11500                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11501                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11502                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11503                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11504                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11505                 </fields>
11506                 <links>
11507                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11508                 </links>
11509                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11510                         <actions>
11511                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11512                                 <retrieve/>
11513                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11514                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11515                         </actions>
11516                 </permacrud>
11517         </class>
11518
11519         <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">
11520                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11521                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11522                         <field name="date_applied" reporter:datatype="timestamp"/>
11523                         <field name="org" reporter:datatype="org_unit"/>
11524                         <field name="original_value" reporter:datatype="text"/>
11525                         <field name="new_value" reporter:datatype="text"/>
11526                         <field name="field_name" reporter:datatype="link"/>
11527                 </fields>
11528                 <links>
11529                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11530                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11531                 </links>
11532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11533                         <actions>
11534                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11535                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11536                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11537                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11538                         </actions>
11539                 </permacrud>
11540         </class>
11541         <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">
11542                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11543                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11544                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11545                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11546                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11547                 </fields>
11548                 <links>
11549                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11550                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11551                 </links>
11552         </class>
11553         <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">
11554                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11555                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11556                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11557                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11558                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11559                 </fields>
11560                 <links>
11561                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11562                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11563                 </links>
11564         </class>
11565         <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">
11566                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11568                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11569                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11570                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11571                 </fields>
11572                 <links>
11573                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11574                 </links>
11575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11576                         <actions>
11577                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11578                                 <retrieve/>
11579                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11580                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11581                         </actions>
11582                 </permacrud>
11583         </class>
11584         <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">
11585                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11586                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11587                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11588                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11589                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11590                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11591                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11592                 </fields>
11593                 <links>
11594                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11595                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11596                 </links>
11597                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11598                         <actions>
11599                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11600                                 <retrieve/>
11601                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11602                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11603                         </actions>
11604                 </permacrud>
11605         </class>
11606         <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">
11607         <oils_persist:source_definition>
11608         SELECT ahcm.target_copy AS id,count(*) AS count
11609          FROM
11610          action.hold_request ahr,
11611          action.hold_copy_map ahcm
11612          WHERE
11613          ahr.cancel_time IS NULL AND
11614          ahr.fulfillment_time IS NULL AND
11615          ahr.capture_time IS NULL AND
11616          ahr.id = ahcm.hold
11617          GROUP BY ahcm.target_copy
11618         </oils_persist:source_definition>
11619         <fields oils_persist:primary="id">
11620             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11621             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11622         </fields>
11623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11624             <actions>
11625                <retrieve/>
11626             </actions>
11627         </permacrud>
11628         </class>
11629
11630         <!-- ********************************************************************************************************************* -->
11631
11632 </IDL>
11633
11634 <!--
11635     vim:noet:ts=4:sw=4:
11636 -->