]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
7764758566ebca7aa040627cbb9a625153989e78
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="ADMIN_COPY_BUCKET">
2438                     <context link="bucket" owning_lib="owning_lib"/>
2439                 </retrieve>
2440             </actions>
2441         </permacrud>
2442         </class>
2443         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2445                         <field name="id" reporter:datatype="id" />
2446                         <field name="item" reporter:datatype="link"/>
2447                         <field name="note" reporter:datatype="text" />
2448                 </fields>
2449                 <links>
2450                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2451                 </links>
2452         </class>
2453
2454         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2455                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2456                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2458                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2459                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2460                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2461                 </fields>
2462                 <links>
2463                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2464                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2465                 </links>
2466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467                         <actions>
2468                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2469                                 <retrieve/>
2470                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2472                         </actions>
2473                 </permacrud>
2474         </class>
2475
2476         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2478                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2480                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2481                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2482                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2483                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2484                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2485                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2486                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2487                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2488                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2489                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2490                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2491                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2492                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2493                 </fields>
2494                 <links>
2495                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2496                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2497                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2498                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2499                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2500                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2501                 </links>
2502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2503                         <actions>
2504                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2505                                 <retrieve/>
2506                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2508                         </actions>
2509                 </permacrud>
2510         </class>
2511
2512         <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">
2513                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2514                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2515                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2516                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2517                 </fields>
2518                 <links>
2519                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2520                 </links>
2521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2522                         <actions>
2523                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2524                                 <retrieve/>
2525                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2527                         </actions>
2528                 </permacrud>
2529         </class>
2530
2531         <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">
2532                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2533                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2534                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2535                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2536                 </fields>
2537                 <links>
2538                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2539                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2540                 </links>
2541                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2542                         <actions>
2543                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2544                                 <retrieve/>
2545                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2547                         </actions>
2548                 </permacrud>
2549         </class>
2550
2551         <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">
2552                 <fields oils_persist:primary="code">
2553                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2554                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2555                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2556                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2557                 </fields>
2558                 <links>
2559                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2560                 </links>
2561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2562                         <actions>
2563                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2564                                 <retrieve/>
2565                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2566                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2567                         </actions>
2568                 </permacrud>
2569         </class>
2570
2571         <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">
2572                 <fields oils_persist:primary="code">
2573                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2574                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2575                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2576                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2577                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2578                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2579                 </fields>
2580                 <links>
2581                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2582                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2583                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2584                 </links>
2585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586                         <actions>
2587                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2588                                 <retrieve/>
2589                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2590                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2591                         </actions>
2592                 </permacrud>
2593         </class>
2594
2595     <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">
2596         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2597             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2598             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2599             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2600         </fields>
2601         <links>
2602             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2603             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2604         </links>
2605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2606             <actions>
2607                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2608                 <retrieve/>
2609                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2610                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2611             </actions>
2612         </permacrud>
2613     </class>
2614
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2617                         <field name="active" reporter:datatype="bool"/>
2618                         <field name="create_date" reporter:datatype="timestamp"/>
2619                         <field name="creator" />
2620                         <field name="deleted" reporter:datatype="bool"/>
2621                         <field name="edit_date" reporter:datatype="timestamp"/>
2622                         <field name="editor" />
2623                         <field name="id" reporter:datatype="id" />
2624                         <field name="last_xact_id" />
2625                         <field name="marc" />
2626                         <field name="source" />
2627                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2628                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2629                         <field name="heading" />
2630                         <field name="simple_heading" />
2631                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2632                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2633                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2634                 </fields>
2635                 <links>
2636                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2637                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2638                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2639                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2640                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2641                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2642                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2643                 </links>
2644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2645                         <actions>
2646                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2647                                 <retrieve/>
2648                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2649                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2650                         </actions>
2651                 </permacrud>
2652         </class>
2653         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2654                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2655                         <field name="char_encoding" />
2656                         <field name="id" />
2657                         <field name="record" />
2658                         <field name="record_status" />
2659                         <field name="thesaurus" />
2660                 </fields>
2661                 <links>
2662                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2663                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2664                 </links>
2665         </class>
2666         <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">
2667                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2668                         <field name="id" reporter:datatype="id" />
2669                         <field name="bib" reporter:datatype="link" />
2670                         <field name="authority" reporter:datatype="link" />
2671                 </fields>
2672                 <links>
2673                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2674                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2675                 </links>
2676         </class>
2677         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2678                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2679                         <field name="id" reporter:datatype="id" />
2680                         <field name="record" reporter:datatype="link" />
2681                         <field name="atag" reporter:datatype="link" />
2682                         <field name="value" reporter:datatype="text" />
2683                 </fields>
2684                 <links>
2685                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2686                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2687                 </links>
2688         </class>
2689         <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">
2690                 <fields oils_persist:primary="code" oils_persist:sequence="">
2691                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2692                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2693                 </fields>
2694                 <links/>
2695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2696             <actions>
2697                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2698                 <retrieve/>
2699                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2700                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2701             </actions>
2702         </permacrud>
2703         </class>
2704         <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">
2705                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2706                         <field name="accepting_usr" />
2707                         <field name="amount" reporter:datatype="money" />
2708                         <field name="amount_collected" reporter:datatype="money" />
2709                         <field name="approval_code" reporter:datatype="text"/>
2710                         <field name="cash_drawer" reporter:datatype="link"/>
2711                         <field name="cc_number" reporter:datatype="text"/>
2712                         <field name="cc_order_number" reporter:datatype="text"/>
2713                         <field name="cc_processor" reporter:datatype="text"/>
2714                         <field name="id" reporter:datatype="id" />
2715                         <field name="note" reporter:datatype="text"/>
2716                         <field name="payment_ts" reporter:datatype="timestamp"/>
2717                         <field name="xact" reporter:datatype="link"/>
2718                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2719                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2720                 </fields>
2721                 <links>
2722                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2723                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2724                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2725                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2726                 </links>
2727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2728             <actions>
2729                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2730                     <context link="xact" jump="usr" field="home_ou"/>
2731                 </retrieve>
2732                         </actions>
2733                 </permacrud>
2734         </class>
2735         <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">
2736                 <fields oils_persist:primary="name">
2737                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2738                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2739                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2740                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2741                 </fields>
2742                 <links/>
2743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2744             <actions>
2745                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2746                 <retrieve/>
2747                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2748                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2749             </actions>
2750         </permacrud>
2751         </class>
2752
2753         <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">
2754                 <fields oils_persist:primary="alias">
2755                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2756                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2757                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2758                 </fields>
2759                 <links>
2760                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2761                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2762                 </links>
2763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2764             <actions>
2765                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2766                 <retrieve/>
2767                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2768                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2769             </actions>
2770         </permacrud>
2771         </class>
2772
2773         <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">
2774                 <fields oils_persist:primary="name">
2775                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2776                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2777                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2778                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2779                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2780                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2781                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2782                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2783                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2784                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2785                 </fields>
2786                 <links>
2787                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2788                 </links>
2789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2790             <actions>
2791                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2792                 <retrieve/>
2793                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2794                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2795             </actions>
2796         </permacrud>
2797         </class>
2798
2799         <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">
2800                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2801                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2802                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2803                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2804                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2805                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2806                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2807                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2808                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2809                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2810                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2811                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2812                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2813                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2814                 </fields>
2815                 <links>
2816                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2817                 </links>
2818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2819             <actions>
2820                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2821                 <retrieve/>
2822                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2823                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2824             </actions>
2825         </permacrud>
2826         </class>
2827         <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">
2828                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2829                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2830                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2831                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2832                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2833                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2834                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2835                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2836                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2837                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2838                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2839                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2840                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2841                 </fields>
2842                 <links>
2843                 </links>
2844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2845                         <actions>
2846                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2847                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2848                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2849                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2850                         </actions>
2851                 </permacrud>
2852         </class>
2853         <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">
2854                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2855                         <field name="id" reporter:datatype="id" />
2856                         <field name="name" reporter:datatype="text"/>
2857                         <field name="xpath" reporter:datatype="text"/>
2858                         <field name="format" reporter:datatype="link"/>
2859                         <field name="first_word" reporter:datatype="bool" />
2860                 </fields>
2861                 <links/>
2862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2863             <actions>
2864                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2865                 <retrieve/>
2866                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2867                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2868             </actions>
2869         </permacrud>
2870         </class>
2871         <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">
2872                 <fields oils_persist:primary="code" oils_persist:sequence="">
2873                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2874                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2875                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2876                 </fields>
2877                 <links/>
2878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2879             <actions>
2880                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2881                 <retrieve/>
2882                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2883                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2884             </actions>
2885         </permacrud>
2886         </class>
2887         <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">
2888                 <fields oils_persist:primary="code" oils_persist:sequence="">
2889                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2890                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2891                 </fields>
2892                 <links/>
2893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2894             <actions>
2895                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2896                 <retrieve/>
2897                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2898                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2899             </actions>
2900         </permacrud>
2901         </class>
2902     <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">
2903         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2904             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2905             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2906             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2907             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2908         </fields>
2909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2910             <actions>
2911                 <retrieve/>
2912             </actions>
2913         </permacrud>
2914     </class>
2915         <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">
2916                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2917                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2918                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2919                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2920                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2921                 </fields>
2922                 <links>
2923                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2924                 </links>
2925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2926             <actions>
2927                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2928                 <retrieve/>
2929                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2930                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2931             </actions>
2932         </permacrud>
2933         </class>
2934         <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">
2935                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2936                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2937                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2938                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2939                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2940                 </fields>
2941                 <links>
2942                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2943                 </links>
2944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2945             <actions>
2946                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2947                 <retrieve/>
2948                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2949                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2950             </actions>
2951         </permacrud>
2952         </class>
2953         <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">
2954                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2955                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2956                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2957                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2958                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2959                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2960                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2961                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2962                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2963                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2964                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2965                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2966                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2967                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2968                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2969                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2970                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2971                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2972                 </fields>
2973                 <links>
2974                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2975                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2976                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2977                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2978                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2979                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2980                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2981                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2982                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2983                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2984                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2985                 </links>
2986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987             <actions>
2988                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2989                 <retrieve/>
2990                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2991                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2992             </actions>
2993         </permacrud>
2994         </class>
2995         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2997                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2998                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2999                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3000                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3001                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3002                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3003                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3004                 </fields>
3005                 <links>
3006                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3007                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3008         </links>
3009         </class>
3010         <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">
3011                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3012                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3013                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3014                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3015                 </fields>
3016                 <links>
3017                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3018                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3019                 </links>
3020         </class>
3021         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3022                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3023                         <field name="id" reporter:datatype="id" />
3024                         <field name="value" oils_persist:i18n="true" />
3025                 </fields>
3026                 <links/>
3027         </class>
3028         <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">
3029                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3030                         <field name="balance_owed" reporter:datatype="money" />
3031                         <field name="total_owed" reporter:datatype="money" />
3032                         <field name="total_paid" reporter:datatype="money" />
3033                         <field name="usr" reporter:datatype="link"/>
3034                 </fields>
3035                 <links>
3036                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3037         </links>
3038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3039             <actions>
3040                 <retrieve permission="VIEW_USER">
3041                     <context link="usr" field="home_ou"/>
3042                 </retrieve>
3043             </actions>
3044         </permacrud>
3045         </class>
3046         <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">
3047                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3048                         <field name="collector" />
3049                         <field name="enter_time" reporter:datatype="timestamp"/>
3050                         <field name="id" reporter:datatype="id" />
3051                         <field name="location" reporter:datatype="link"/>
3052                         <field name="usr" reporter:datatype="link"/>
3053                 </fields>
3054                 <links>
3055                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3056                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3057                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3058                 </links>
3059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3060             <actions>
3061                 <create permission="money.collections_tracker.create" context_field="location"/>
3062                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3063                 <delete permission="money.collections_tracker.create" context_field="location"/>
3064             </actions>
3065         </permacrud>
3066         </class>
3067         <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">
3068                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3069                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3070                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3071                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3072                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3073                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3074                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3075                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3076                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3077                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3078                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3079                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3080                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3081                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3082                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3083                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3084                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3085                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3086                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3087                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3095                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3096                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3097                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3098                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3099                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3100                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3101                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3102                 </fields>
3103                 <links>
3104                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3105                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3106                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3107                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3108                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3109                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3110                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3111                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3112                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3113                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3114                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3115                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3116                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3117                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3118                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3119                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3120                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3121                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3122                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3123                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3124                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3125                 </links>
3126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3127             <actions>
3128                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3129                 <retrieve/>
3130                 <update permission="UPDATE_MARC" global_required="true"/>
3131                 <!-- 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. -->
3132                 <delete permission="DELETE_RECORD" global_required="true"/>
3133             </actions>
3134         </permacrud>
3135         </class>
3136         <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">
3137                 <fields oils_persist:primary="id">
3138                         <field name="dow_0_close" />
3139                         <field name="dow_0_open" />
3140                         <field name="dow_1_close" />
3141                         <field name="dow_1_open" />
3142                         <field name="dow_2_close" />
3143                         <field name="dow_2_open" />
3144                         <field name="dow_3_close" />
3145                         <field name="dow_3_open" />
3146                         <field name="dow_4_close" />
3147                         <field name="dow_4_open" />
3148                         <field name="dow_5_close" />
3149                         <field name="dow_5_open" />
3150                         <field name="dow_6_close" />
3151                         <field name="dow_6_open" />
3152                         <field name="id" reporter:datatype="id" />
3153                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3154                 </fields>
3155                 <links>
3156                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3157                 </links>
3158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3159             <actions>
3160                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3161                 <retrieve/>
3162                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3163                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3164             </actions>
3165         </permacrud>
3166         </class>
3167         <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">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3169                         <field name="id" reporter:datatype="id" />
3170                         <field name="record" reporter:datatype="link"/>
3171                         <field name="label" reporter:datatype="text"/>
3172                         <field name="label_sortkey" reporter:datatype="text"/>
3173                         <field name="deleted" reporter:datatype="bool"/>
3174                 </fields>
3175                 <links>
3176                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3177                 </links>
3178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3179             <actions>
3180                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3181                 <retrieve/>
3182                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3183                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3184             </actions>
3185         </permacrud>
3186         </class>
3187         <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">
3188                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3189                         <field name="id" reporter:datatype="id" />
3190                         <field name="target_copy" reporter:datatype="link" />
3191                         <field name="part" reporter:datatype="link"/>
3192                 </fields>
3193                 <links>
3194                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3195                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3196                 </links>
3197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3198             <actions>
3199                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3200                 <retrieve/>
3201                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3202                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3203             </actions>
3204         </permacrud>
3205         </class>
3206         <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">
3207                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3208                         <field name="close_end" reporter:datatype="timestamp" />
3209                         <field name="close_start" reporter:datatype="timestamp" />
3210                         <field name="id" reporter:datatype="id" />
3211                         <field name="org_unit" reporter:datatype="org_unit"/>
3212                         <field name="reason" reporter:datatype="text"/>
3213                         <field name="full_day" reporter:datatype="bool"/>
3214                         <field name="multi_day" reporter:datatype="bool"/>
3215                 </fields>
3216                 <links>
3217                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3218                 </links>
3219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3220             <actions>
3221                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3222                 <retrieve/>
3223                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3224                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3225             </actions>
3226         </permacrud>
3227         </class>
3228         <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">
3229                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3230                         <field name="extended" reporter:datatype="interval"/>
3231                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3232                         <field name="max_renewals" reporter:datatype="int" />
3233                         <field name="name" reporter:datatype="text"/>
3234                         <field name="normal" reporter:datatype="interval"/>
3235                         <field name="shrt" reporter:datatype="interval"/>
3236                 </fields>
3237                 <links>
3238                 </links>
3239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3240             <actions>
3241                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3242                 <retrieve/>
3243                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3244                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3245             </actions>
3246         </permacrud>
3247         </class>
3248
3249         <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">
3250                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3252                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3253             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3254                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3255             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3256                 </fields>
3257                 <links>
3258             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3259                 </links>
3260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3261             <actions>
3262                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3263                 <retrieve/>
3264                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3265                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3266             </actions>
3267                 </permacrud>
3268         </class>
3269
3270         <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">
3271                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3272                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3273                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3274                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3275             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3276                 </fields>
3277                 <links>
3278                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3279                 </links>
3280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3281             <actions>
3282                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3283                 <retrieve/>
3284                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3285                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3286             </actions>
3287                 </permacrud>
3288         </class>
3289
3290         <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">
3291                 <fields oils_persist:primary="id" oils_persist:sequence="">
3292                         <field name="balance_owed" reporter:datatype="money"/>
3293                         <field name="id" reporter:datatype="id" />
3294                         <field name="last_billing_note" reporter:datatype="text"/>
3295                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3296                         <field name="last_billing_type" reporter:datatype="text"/>
3297                         <field name="last_payment_note" reporter:datatype="text"/>
3298                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3299                         <field name="last_payment_type" reporter:datatype="text"/>
3300                         <field name="total_owed" reporter:datatype="money"/>
3301                         <field name="total_paid" reporter:datatype="money"/>
3302                         <field name="usr" reporter:datatype="link"/>
3303                         <field name="xact_finish" reporter:datatype="timestamp" />
3304                         <field name="xact_start" reporter:datatype="timestamp" />
3305                         <field name="xact_type" reporter:datatype="text"/>
3306                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3307                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3308                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3309                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3310                         <field name="billing_location" reporter:datatype="link"/>
3311                 </fields>
3312                 <links>
3313                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3314                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3315                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3316                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3317                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3318                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3319                 </links>
3320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3321                         <actions>
3322                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3323                                         <context link="usr" field="home_ou" />
3324                                 </retrieve>
3325                         </actions>
3326                 </permacrud>
3327         </class>
3328         <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">
3329                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3330                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3331                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3332                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3333                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3334                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3335                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3336                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3337                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3338                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3339                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3340                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3341                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3342                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3343                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3344                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3345                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3346                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3347                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3348                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3349                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3350                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3351                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3352                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3353                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3354                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3355                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3356                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3357                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3358                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3359                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3360                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3361                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3362                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3363                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3364                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3365                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3366                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3367                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3368                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3369                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3370                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3371                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3372                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3373                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3374                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3375                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3376                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3377                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3378                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3379                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3380                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3381                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3383                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3384                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3385                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3386                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3387                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3388                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3389                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3390                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3391                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3392                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3393                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3394                 </fields>
3395                 <links>
3396                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3397                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3398                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3399                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3400                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3401                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3402                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3403                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3404                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3405                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3406                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3407                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3408                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3409                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3410                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3411                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3412                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3413                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3414                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3415                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3416                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3417                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3418                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3419                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3420                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3421                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3422                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3423                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3424                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3425                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3426                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3427                 </links>
3428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3429                         <actions>
3430                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3431                         </actions>
3432                 </permacrud>
3433         </class>
3434         <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">
3435                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3436                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3437                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3438                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3439                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3440                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3441                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3442                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3443                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3444         </fields>
3445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3446                         <actions>
3447                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3448                                 <retrieve/>
3449                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3450                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3451                         </actions>
3452                 </permacrud>
3453         </class>
3454         <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">
3455                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3456                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3457                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3458                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3459                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3460         </fields>
3461         <links>
3462                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3463                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3464                 </links>
3465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3466                         <actions>
3467                                 <retrieve permission="RUN_REPORTS">
3468                                         <context link="usr" field="home_ou" />
3469                                 </retrieve>
3470                         </actions>
3471                 </permacrud>
3472         </class>
3473         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3474                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3475                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3476                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3477                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3478                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3479                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3480                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3481         </fields>
3482         <links>
3483                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3484                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3485                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3486                 </links>
3487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3488                         <actions>
3489                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3490                                         <context link="usr" field="home_ou" />
3491                                         <context link="ws" field="owning_lib" />
3492                                 </retrieve>
3493                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3494                                         <context link="usr" field="home_ou" />
3495                                         <context link="ws" field="owning_lib" />
3496                                 </create>
3497                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3498                                         <context link="usr" field="home_ou" />
3499                                         <context link="ws" field="owning_lib" />
3500                                 </update>
3501                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3502                                         <context link="usr" field="home_ou" />
3503                                         <context link="ws" field="owning_lib" />
3504                                 </delete>
3505                         </actions>
3506                 </permacrud>
3507         </class>
3508         <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">
3509                 <fields oils_persist:primary="name">
3510                         <field name="name" reporter:datatype="text"/>
3511                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3512                 </fields>
3513                 <links/>
3514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3515                         <actions>
3516                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3517                                 <retrieve/>
3518                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3519                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3520                         </actions>
3521                 </permacrud>
3522         </class>
3523         <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">
3524                 <fields oils_persist:primary="name">
3525                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3526                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3527                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3528                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3529                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3530                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3531                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3532                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3533                 </fields>
3534                 <links>
3535                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3536                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3537                 </links>
3538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3539                         <actions>
3540                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3541                                 <retrieve/>
3542                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3543                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3544                         </actions>
3545                 </permacrud>
3546         </class>
3547         <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">
3548                 <fields oils_persist:primary="name">
3549                         <field name="name" reporter:datatype="text"/>
3550                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3551                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3552                         <field name="datatype" reporter:datatype="text"/>
3553                         <field name="view_perm" reporter:datatype="link"/>
3554                         <field name="update_perm" reporter:datatype="link"/>
3555                         <field name="fm_class" reporter:datatype="text"/>
3556                         <field name="grp" reporter:datatype="link"/>
3557                 </fields>
3558                 <links>
3559                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3560                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3561                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3562                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3563                 </links>
3564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3565                         <actions>
3566                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3567                                 <retrieve/>
3568                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3569                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3570                         </actions>
3571                 </permacrud>
3572         </class>
3573         <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">
3574                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3575                         <field name="id" />
3576                         <field name="name"  reporter:datatype="text"/>
3577                         <field name="org_unit" reporter:datatype="org_unit"/>
3578                         <field name="value"  reporter:datatype="text"/>
3579                 </fields>
3580                 <links>
3581                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3582                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3583                 </links>
3584         </class>
3585         <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">
3586                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3587                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3588                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3589                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3590                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3591                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3592                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3593                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3594                 </fields>
3595                 <links>
3596                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3597                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3598                 </links>
3599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3600             <actions>
3601                 <create permission="CREATE_COPY_NOTE">
3602                     <context link="owning_copy" field="circ_lib"/>
3603                 </create>
3604                 <retrieve permission="VIEW_COPY_NOTES">
3605                     <context link="owning_copy" field="circ_lib"/>
3606                 </retrieve>
3607                 <update permission="UPDATE_COPY_NOTE">
3608                     <context link="owning_copy" field="circ_lib"/>
3609                 </update>
3610                 <delete permission="DELETE_COPY_NOTE">
3611                     <context link="owning_copy" field="circ_lib"/>
3612                 </delete>
3613             </actions>
3614         </permacrud>
3615         </class>
3616         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3617                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3618                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3619                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3620                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3621                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3622                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3623                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3624                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3625                 </fields>
3626                 <links>
3627                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3628                 </links>
3629         </class>
3630         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3631                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3632                         <field name="fingerprint"  reporter:datatype="text"/>
3633                         <field name="id" reporter:datatype="id" />
3634                         <field name="master_record" reporter:datatype="link"/>
3635                         <field name="mods"  reporter:datatype="text"/>
3636                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3637                 </fields>
3638                 <links>
3639                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3640                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3641                 </links>
3642         </class>
3643         <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">
3644                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3645                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3646                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3647                 </fields>
3648                 <links/>
3649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3650             <actions>
3651                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3652                 <retrieve/>
3653                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3654                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3655             </actions>
3656         </permacrud>
3657         </class>
3658         <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">
3659                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3660                         <field name="code"  reporter:datatype="text"/>
3661                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3662                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3663                 </fields>
3664                 <links/>
3665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3666             <actions>
3667                 <create permission="CREATE_PERM" global_required="true"/>
3668                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3669                 <update permission="UPDATE_PERM" global_required="true"/>
3670                 <delete permission="DELETE_PERM" global_required="true"/>
3671             </actions>
3672         </permacrud>
3673         </class>
3674         <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">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3676                         <field name="id" reporter:datatype="id" />
3677                         <field name="metarecord" reporter:datatype="link"/>
3678                         <field name="source" reporter:datatype="link"/>
3679                 </fields>
3680                 <links>
3681                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3682                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3683                 </links>
3684         </class>
3685         <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">
3686                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3687                         <field name="id" reporter:datatype="id" />
3688                         <field name="field" reporter:datatype="link"/>
3689                         <field name="source" reporter:datatype="link"/>
3690                         <field name="value"  reporter:datatype="text"/>
3691                 </fields>
3692                 <links>
3693                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3694                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3695                 </links>
3696         </class>
3697         <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">
3698                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3699                         <field name="id" reporter:datatype="id" />
3700                         <field name="value" reporter:datatype="text"/>
3701                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3702                 </fields>
3703                 <links>
3704                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3705                 </links>
3706         </class>
3707         <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">
3708                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3709                         <field name="id" reporter:datatype="id" />
3710                         <field name="entry" reporter:datatype="link"/>
3711                         <field name="def" reporter:datatype="link"/>
3712                         <field name="source" reporter:datatype="link"/>
3713                 </fields>
3714                 <links>
3715                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3716                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3717                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3718                 </links>
3719         </class>
3720         <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">
3721                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3722                         <field name="id" reporter:datatype="id" />
3723                         <field name="entry" reporter:datatype="link"/>
3724                         <field name="simple_heading" reporter:datatype="link"/>
3725                 </fields>
3726                 <links>
3727                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3728                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3729                 </links>
3730         </class>
3731         <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">
3732                 <oils_persist:source_definition>
3733                         SELECT * FROM metabib.author_field_entry
3734                                                 UNION ALL
3735                         SELECT * FROM metabib.keyword_field_entry
3736                                                 UNION ALL
3737                         SELECT * FROM metabib.identifier_field_entry
3738                                                 UNION ALL
3739                         SELECT * FROM metabib.title_field_entry
3740                                                 UNION ALL
3741                         SELECT * FROM metabib.subject_field_entry
3742                                                 UNION ALL
3743                         SELECT * FROM metabib.series_field_entry
3744                 </oils_persist:source_definition>
3745                 <fields>
3746                         <field name="field" reporter:datatype="link"/>
3747                         <field name="id" reporter:datatype="id" />
3748                         <field name="source" reporter:datatype="link"/>
3749                         <field name="value"  reporter:datatype="text"/>
3750                 </fields>
3751                 <links>
3752                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3753                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3754                 </links>
3755         </class>
3756         <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">
3757                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3758                         <field name="field" reporter:datatype="link"/>
3759                         <field name="id" reporter:datatype="id" />
3760                         <field name="source" reporter:datatype="link"/>
3761                         <field name="value"  reporter:datatype="text"/>
3762                 </fields>
3763                 <links>
3764                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3765                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3766                 </links>
3767         </class>
3768         <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">
3769                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3770                         <field name="accepting_usr" reporter:datatype="link"/>
3771                         <field name="amount" reporter:datatype="money" />
3772                         <field name="amount_collected" reporter:datatype="money" />
3773                         <field name="cash_drawer" reporter:datatype="link"/>
3774                         <field name="id" reporter:datatype="id" />
3775                         <field name="note"  reporter:datatype="text"/>
3776                         <field name="payment_ts" reporter:datatype="timestamp"/>
3777                         <field name="xact" reporter:datatype="link"/>
3778                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3779                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3780                 </fields>
3781                 <links>
3782                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3783                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3784                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3785                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3786                 </links>
3787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3788             <actions>
3789                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3790                     <context link="xact" jump="usr" field="home_ou"/>
3791                 </retrieve>
3792                         </actions>
3793                 </permacrud>
3794         </class>
3795         <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">
3796                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3797                         <field name="accepting_usr" reporter:datatype="link"/>
3798                         <field name="amount" reporter:datatype="money" />
3799                         <field name="amount_collected" reporter:datatype="money" />
3800                         <field name="id" reporter:datatype="id" />
3801                         <field name="note"  reporter:datatype="text"/>
3802                         <field name="payment_ts" reporter:datatype="timestamp"/>
3803                         <field name="xact" reporter:datatype="link"/>
3804                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3805                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3806                 </fields>
3807                 <links>
3808                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3809                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3810                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3811                 </links>
3812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3813             <actions>
3814                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3815                     <context link="xact" jump="usr" field="home_ou"/>
3816                 </retrieve>
3817                         </actions>
3818                 </permacrud>
3819         </class>
3820         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3821                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3822                         <field name="accepting_usr" reporter:datatype="link"/>
3823                         <field name="amount" reporter:datatype="money" />
3824                         <field name="amount_collected" reporter:datatype="money" />
3825                         <field name="id" reporter:datatype="id" />
3826                         <field name="note"  reporter:datatype="text"/>
3827                         <field name="payment_ts" reporter:datatype="timestamp"/>
3828                         <field name="xact" reporter:datatype="link"/>
3829                         <field name="billing" reporter:datatype="link"/>
3830                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3831                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3832                 </fields>
3833                 <links>
3834                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3835                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3836                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3837                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3838                 </links>
3839         </class>
3840         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3842                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3843                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3844                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3845                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3846                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3847                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3848                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3849                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3850                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3851                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3852                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3853                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3854                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3855                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3856                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3857                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3858                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3859                 </fields>
3860                 <links>
3861                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3862                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3863                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3864                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3865                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3866                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3867                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3868                 </links>
3869         </class>
3870
3871         <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">
3872                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3873                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3874                         <field name="name"  reporter:datatype="text"/>
3875                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3876                         <field name="block_list" reporter:datatype="text"/>
3877                         <field name="staff_alert" reporter:datatype="bool"/>
3878                         <field name="org_depth" reporter:datatype="int"/>
3879                         <field name="ignore_proximity" reporter:datatype="int"/>
3880                 </fields>
3881                 <links/>
3882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883             <actions>
3884                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3885                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3886                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3887                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3888             </actions>
3889         </permacrud>
3890         </class>
3891         <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">
3892                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3893                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3894                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3895                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3896                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3897                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3898                 </fields>
3899                 <links>
3900                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3901                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3902                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3903         </links>
3904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3905             <actions>
3906                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3907                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3908                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3909                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3910             </actions>
3911         </permacrud>
3912         </class>
3913         <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">
3914                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3915                         <field name="holdable" reporter:datatype="bool"/>
3916                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3917                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3918                         <field name="opac_visible" reporter:datatype="bool"/>
3919             <field name="copy_active" reporter:datatype="bool"/>
3920             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3921             <field name="is_available" reporter:datatype="bool"/>
3922                 </fields>
3923                 <links/>
3924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3925             <actions>
3926                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3927                 <retrieve/>
3928                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3929                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3930             </actions>
3931         </permacrud>
3932         </class>
3933         <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">
3934                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3935                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3936                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3937                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3938                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3939                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3940                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3941                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3942                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3943                 </fields>
3944                 <links>
3945                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3946                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3947                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3948                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3949                 </links>
3950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3951                         <actions>
3952                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3953                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3954                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3955                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3956                         </actions>
3957                 </permacrud>
3958         </class>
3959         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3960                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3961                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3962                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3963                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3964                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3965                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3966                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3967                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3968                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3969                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3970                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3971                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3972                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3973                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3974                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3975                 </fields>
3976                 <links>
3977                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3978                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3979                 </links>
3980         </class>
3981         <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">
3982                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3983                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3984                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3985                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3986                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3987                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3988                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3989                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3990                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3991                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3992                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3993                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3994                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3995                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3996                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3997                 </fields>
3998                 <links>
3999                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4000                 </links>
4001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4002                         <actions>
4003                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4004                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4005                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4006                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4007                         </actions>
4008                 </permacrud>
4009         </class>
4010
4011
4012         <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">
4013                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4014                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4015                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4016                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4017                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4018                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4019                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4020                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4021                 </fields>
4022                 <links>
4023                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4024                 </links>
4025         </class>
4026
4027         <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">
4028                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4029                         <field name="call_number" />
4030                         <field name="create_date" reporter:datatype="timestamp"/>
4031                         <field name="creator" reporter:datatype="link"/>
4032                         <field name="id" reporter:datatype="id" />
4033                         <field name="pub" reporter:datatype="bool"/>
4034                         <field name="title"  reporter:datatype="text"/>
4035                         <field name="value"  reporter:datatype="text"/>
4036                 </fields>
4037                 <links>
4038                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4039                 </links>
4040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4041             <actions>
4042                 <create permission="CREATE_VOLUME_NOTE">
4043                     <context link="call_number" field="owning_lib"/>
4044                 </create>
4045                 <retrieve permission="VIEW_VOLUME_NOTES">
4046                     <context link="call_number" field="owning_lib"/>
4047                 </retrieve>
4048                 <update permission="UPDATE_VOLUME_NOTE">
4049                     <context link="call_number" field="owning_lib"/>
4050                 </update>
4051                 <delete permission="DELETE_VOLUME_NOTE">
4052                     <context link="call_number" field="owning_lib"/>
4053                 </delete>
4054             </actions>
4055         </permacrud>
4056         </class>
4057         <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">
4058                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4059                         <field name="create_date" reporter:datatype="timestamp"/>
4060                         <field name="creator" reporter:datatype="link"/>
4061                         <field name="edit_date" reporter:datatype="timestamp"/>
4062                         <field name="editor" reporter:datatype="link"/>
4063                         <field name="id" reporter:datatype="id" />
4064                         <field name="record" reporter:datatype="link"/>
4065                         <field name="value" reporter:datatype="text"/>
4066                 </fields>
4067                 <links>
4068                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4069                 </links>
4070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4071             <actions>
4072                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4073                 <retrieve/>
4074                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4075                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4076             </actions>
4077         </permacrud>
4078         </class>
4079         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4080         <oils_persist:source_definition>
4081 SELECT  usr,
4082         SUM(
4083             CASE
4084                 WHEN (
4085                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4086                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4087                 ) THEN 1
4088                 ELSE 0
4089             END
4090         ) AS out,
4091
4092         SUM(
4093             CASE
4094                 WHEN (
4095                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4096                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4097                 ) THEN 1
4098                 ELSE 0
4099             END
4100         ) AS overdue,
4101
4102         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4103         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4104         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4105   FROM  action.circulation
4106   WHERE checkin_time IS NULL
4107   GROUP BY 1
4108         </oils_persist:source_definition>
4109         <fields oils_persist:primary="usr">
4110             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4111             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4112             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4113             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4114             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4115             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4116         </fields>
4117         <links>
4118             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4119         </links>
4120         </class>
4121         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4122         <oils_persist:source_definition>
4123 SELECT  usr,
4124         STRING_AGG(
4125             CASE
4126                 WHEN (
4127                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4128                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4129                 ) THEN id::TEXT
4130                 ELSE '0'
4131             END
4132         ,',') AS out,
4133
4134         STRING_AGG(
4135             CASE
4136                 WHEN (
4137                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4138                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4139                 ) THEN id::TEXT
4140                 ELSE '0'
4141             END
4142         ,',') AS overdue,
4143
4144         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4145         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4146         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4147   FROM  action.circulation
4148   WHERE checkin_time IS NULL
4149   GROUP BY 1
4150         </oils_persist:source_definition>
4151         <fields oils_persist:primary="usr">
4152             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4153             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4154             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4155             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4156             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4157             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4158         </fields>
4159         <links>
4160             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4161         </links>
4162         </class>
4163         <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">
4164                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4165                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4166                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4167                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4168                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4169                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4170                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4171                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4172                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4173                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4174                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4175                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4176                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4177                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4178                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4179                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4180                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4181                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4182                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4183                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4184                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4185                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4186                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4187                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4188                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4189                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4190                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4191                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4192                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4193                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4194                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4195                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4196                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4197                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4198                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4199                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4200                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4201                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4202                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4203                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4204                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4205                 </fields>
4206                 <links>
4207                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4208                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4209                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4210                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4211                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4212                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4213                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4214                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4215                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4216                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4217                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4218                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4219                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4220                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4221                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4222                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4223                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4224                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4225                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4226                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4227                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4228                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4229                 </links>
4230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4231                         <actions>
4232                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4233                         </actions>
4234                 </permacrud>
4235         </class>
4236         <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">
4237                 <fields>
4238                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4239                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4240                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4241                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4242                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4243                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4244                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4245                 </fields>
4246                 <links>
4247                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4248                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4249                 </links>
4250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4251                         <actions>
4252                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4253                         </actions>
4254                 </permacrud>
4255         </class>
4256         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4257                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4258                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4259                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4260                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4261                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4262                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4263                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4264                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4265                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4266                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4267                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4268                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4269                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4270                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4271                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4272                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4273                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4274                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4275                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4276                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4277                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4278                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4279                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4280                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4281                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4282                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4283                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4284                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4285                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4286                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4287                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4288                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4289                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4290                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4291                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4292                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4293                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
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="workstation" reltype="has_a" key="id" map="" class="aws"/>
4315                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4316                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4317                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4318                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4319                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4320                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4321                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4322                 </links>
4323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4324                         <actions>
4325                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4326                         </actions>
4327                 </permacrud>
4328         </class>
4329
4330         <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">
4331                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4332                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4333                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4334                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4335                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4336                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4337                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4338                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4339                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4340                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4341                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4342                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4343                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4344                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4345                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4346                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4347                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4348                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4349                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4350                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4351                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4352                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4353                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4354                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4355                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4356                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4357                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4358                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4359                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4360                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4361                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4362                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4363                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4364                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4365                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4366                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4367                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4368                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4369                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4370                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4371                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4372                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4373                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4374                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4375                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4376                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4377                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4378                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4379                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4380                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4381                 </fields>
4382                 <links>
4383                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4384                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4385                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4386                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4387                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4388                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4389                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4390                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4391                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4392                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4393                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4394                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4395                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4396                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4397                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4398                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4399                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4400                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4401                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4402                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4403                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4404                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4405                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4406                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4407                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4408                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4409                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4410                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4411                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4412                 </links>
4413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4414                         <actions>
4415                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4416                         </actions>
4417                 </permacrud>
4418         </class>
4419         <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">
4420                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4421                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4422                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4423                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4424                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4425                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4426                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4427                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4428                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4429                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4430                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4431                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4432                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4433                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4434                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4435                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4436                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4437                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4438                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4439                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4440                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4441                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4442                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4443                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4444                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4445                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4446                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4447                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4448                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4449                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4450                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4451                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4452                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4453                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4454                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4455                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4456                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4457                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4458                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4459                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4460                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4461                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4462                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4463                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4464                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4465                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4466                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4467                 </fields>
4468                 <links>
4469                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4470                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4471                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4472                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4473                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4474                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4475                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4476                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4477                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4478                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4479                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4480                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4481                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4482                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4483                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4484                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4485                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4486                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4487                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4488                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4489                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4490                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4491                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4492                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4493                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4494                 </links>
4495         </class>
4496         <class id="auch" 
4497                 controller="open-ils.cstore" 
4498                 oils_obj:fieldmapper="action::user_circ_history" 
4499                 oils_persist:tablename="action.usr_circ_history" 
4500                 reporter:label="User Checkout History">
4501                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4503                         <!-- prevent reporting on the user that owns the checkout history -->
4504                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4505                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4506                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4507                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4508                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4509                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4510                 </fields>
4511                 <links>
4512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4513                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4514                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4515                 </links>
4516         </class>
4517         <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">
4518                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4519                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4520                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4521                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4522                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4523                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4524                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4525                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4526                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4527                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4528                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4529                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4530                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4531                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4532                 </fields>
4533                 <links>
4534                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4535                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4536                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4537                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4538                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4539                 </links>
4540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4541                         <actions>
4542                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4543                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4544                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4545                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4546                         </actions>
4547                 </permacrud>
4548         </class>
4549
4550         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4551                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4552                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4553                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4554                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4555                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4556                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4557                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4558                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4559                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4560                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4561                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4562                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4563                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4564                 </fields>
4565                 <links>
4566                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4567                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4568                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4569                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4570                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4571                 </links>
4572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4573                         <actions>
4574                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4575                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4576                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4577                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4578                         </actions>
4579                 </permacrud>
4580         </class>
4581         
4582         <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">
4583                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4584                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4585                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4586                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4587                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4588                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4589                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4590                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4591                 </fields>
4592                 <links>
4593                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4594                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4595                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4596                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4597                 </links>
4598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4599                         <actions>
4600                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4601                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4602                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4603                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4604                         </actions>
4605                 </permacrud>
4606         </class>
4607         
4608         <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">
4609                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4610                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4611                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4612                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4613                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4614                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4615                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4616                 </fields>
4617                 <links>
4618                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4619                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4620                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4621                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4622                 </links>
4623                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4624                         <actions>
4625                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4626                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4627                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4628                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4629                         </actions>
4630                 </permacrud>
4631         </class>
4632         
4633         <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">
4634                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4635                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4636                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4637                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4638                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4639                 </fields>
4640                 <links>
4641                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4642                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4643                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4644                 </links>
4645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4646                         <actions>
4647                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4648                     <context link="resource" field="owner" />
4649                 </create>
4650                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4651                     <context link="resource" field="owner" />
4652                 </retrieve>
4653                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4654                     <context link="resource" field="owner" />
4655                 </update>
4656                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4657                     <context link="resource" field="owner" />
4658                 </delete>
4659                         </actions>
4660                 </permacrud>
4661         </class>
4662         
4663         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4664                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4665                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4666                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4667                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4668                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4669                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4670                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4673                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4674                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4675                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4676                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4677                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4678                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4679                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4680                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4681                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4682                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4683                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4684                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4685                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4686                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4687                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4688                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4689                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4690                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4691                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4692                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4693                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4694                 </fields>
4695                 <links>
4696                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4697                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4698                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4699                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4700                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4701                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4702                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4703                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4704                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4705                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4706                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4707                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4708                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4709                 </links>
4710                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4711                         <actions>
4712                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4713                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4714                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4715                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4716                         </actions>
4717                 </permacrud>
4718         </class>
4719         
4720         <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">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4722                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4723                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4724                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4725                 </fields>
4726                 <links>
4727                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4728                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4729                 </links>
4730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4731                         <actions>
4732                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4733                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4734                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4735                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4736                         </actions>
4737                 </permacrud>
4738         </class>
4739
4740         <class id="ccnbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
4741                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4742                         <field name="bucket" reporter:datatype="link"/>
4743                         <field name="id" reporter:datatype="id" />
4744                         <field name="target_call_number" reporter:datatype="link" />
4745                         <field name="create_time" reporter:datatype="timestamp" />
4746                         <field name="pos" reporter:datatype="int" />
4747                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4748                 </fields>
4749                 <links>
4750                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4751                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4752             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4753                 </links>
4754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4755                         <actions>
4756                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
4757                     <context link="bucket" owning_lib="owning_lib"/>
4758                 </retrieve>
4759             </actions>
4760         </permacrud>
4761         </class>
4762         <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">
4763                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4764                         <field name="id" reporter:datatype="id" />
4765                         <field name="item" reporter:datatype="link"/>
4766                         <field name="note" reporter:datatype="text" />
4767                 </fields>
4768                 <links>
4769                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4770                 </links>
4771         </class>
4772         <class id="cbreb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4773                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4774                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4775                         <field name="btype" reporter:datatype="text"/>
4776                         <field name="id" reporter:datatype="id" />
4777                         <field name="name" reporter:datatype="text"/>
4778                         <field name="description" reporter:datatype="text"/>
4779                         <field name="owner" reporter:datatype="link"/>
4780                         <field name="pub" reporter:datatype="bool"/>
4781                         <field name="create_time" reporter:datatype="timestamp" />
4782                         <field name="owning_lib" reporter:datatype="org_unit" />
4783                 </fields>
4784                 <links>
4785                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4786                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4787                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4788                 </links>
4789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4790                         <actions>
4791                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4792                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4793                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4794                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4795                         </actions>
4796                 </permacrud>
4797         </class>
4798         <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">
4799                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4800                         <field name="id" reporter:datatype="id" />
4801                         <field name="bucket" reporter:datatype="link"/>
4802                         <field name="note" reporter:datatype="text" />
4803                 </fields>
4804                 <links>
4805                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4806                 </links>
4807         </class>
4808         <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">
4809                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4810                         <field name="hold" reporter:datatype="link"/>
4811                         <field name="id" reporter:datatype="id" />
4812                         <field name="target_copy" reporter:datatype="link"/>
4813                         <field name="proximity" reporter:datatype="number"/>
4814                 </fields>
4815                 <links>
4816                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4817                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4818                 </links>
4819         </class>
4820         <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">
4821                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4822                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4823                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4824                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4825                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4826                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4827                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4828                 </fields>
4829                 <links>
4830                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4831                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4832                 </links>
4833         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4834             <actions>
4835                 <create permission="CREATE_HOLD_NOTIFICATION">
4836                                         <context link="hold" jump="usr" field="home_ou" />
4837                                 </create>
4838                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4839                                         <context link="hold" jump="usr" field="home_ou" />
4840                                 </retrieve>
4841                 <update permission="CREATE_HOLD_NOTIFICATION">
4842                                         <context link="hold" jump="usr" field="home_ou" />
4843                                 </update>
4844                 <delete permission="CREATE_HOLD_NOTIFICATION">
4845                                         <context link="hold" jump="usr" field="home_ou" />
4846                                 </delete>
4847             </actions>
4848         </permacrud>
4849         </class>
4850         <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">
4851                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4852                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4853                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4854                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4855                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4856                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4857                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4858                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4859                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4860                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4861                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4862                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4863                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4864                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4865                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4866                 </fields>
4867                 <links>
4868                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4869                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4870                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4871                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4872                 </links>
4873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4874             <actions>
4875                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4876                 <retrieve/>
4877                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4878                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4879             </actions>
4880         </permacrud>
4881         </class>
4882         <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">
4883                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4884                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4885                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4886                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4887                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4888             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4889             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4890             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4891                 </fields>
4892                 <links>
4893                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4894                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4895                 </links>
4896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4897             <actions>
4898                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4899                 <retrieve/>
4900                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4901                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4902             </actions>
4903         </permacrud>
4904         </class>
4905         <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">
4906                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4907                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4908             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4909             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4910                 </fields>
4911                 <links>
4912                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4913                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4914                 </links>
4915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4916             <actions>
4917                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4918                                         <context link="lgroup" field="owner" />
4919                 </create>
4920                 <retrieve/>
4921                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4922                                         <context link="lgroup" field="owner" />
4923                 </update>
4924                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4925                                         <context link="lgroup" field="owner" />
4926                 </delete>
4927             </actions>
4928         </permacrud>
4929         </class>
4930
4931     <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">
4932         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4933             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4934             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4935             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4936             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4937         </fields>
4938         <links>
4939             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4940             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4941         </links>
4942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4943             <actions>
4944                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4945                 <retrieve/>
4946                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4947                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4948             </actions>
4949         </permacrud>
4950     </class>
4951
4952         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4953                 <fields>
4954                         <field name="sre_id" oils_persist:virtual="true" />
4955                         <field name="location" oils_persist:virtual="true" />
4956                         <field name="owning_lib" oils_persist:virtual="true" />
4957                         <field name="basic_holdings" oils_persist:virtual="true" />
4958                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4959                         <field name="supplement_holdings" oils_persist:virtual="true" />
4960                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4961                         <field name="index_holdings" oils_persist:virtual="true" />
4962                         <field name="index_holdings_add" oils_persist:virtual="true" />
4963                         <field name="online" oils_persist:virtual="true" />
4964                         <field name="missing" oils_persist:virtual="true" />
4965                         <field name="incomplete" oils_persist:virtual="true" />
4966                 </fields>
4967         </class>
4968
4969         <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">
4970                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4971                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4972                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4973                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4974                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4975                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4976                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4977                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4978                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4979                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4980                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4981                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4982                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4983                 </fields>
4984                 <links>
4985                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4986                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4987                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4988                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4989                 </links>
4990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4991                         <actions>
4992                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4993                                 <retrieve/>
4994                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4995                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4996                         </actions>
4997                 </permacrud>
4998         </class>
4999
5000         <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">
5001                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5002                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5003                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5004                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5005                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5006                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5007                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5008                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5009                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5010                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5011                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5012                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5013                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5014                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5015                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5016                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5017                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5018                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5019                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5020                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5021                 </fields>
5022                 <links>
5023                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5024                 </links>
5025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5026                         <actions>
5027                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5028                                         <context link="subscription" field="owning_lib" />
5029                                 </create>
5030                                 <retrieve />
5031                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5032                                         <context link="subscription" field="owning_lib" />
5033                                 </update>
5034                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5035                                         <context link="subscription" field="owning_lib" />
5036                                 </delete>
5037                         </actions>
5038                 </permacrud>
5039         </class>
5040
5041         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5042                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5043                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5044                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5045                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5046                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5047                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5048                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5049                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5050                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5051                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5052                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5053                 </fields>
5054                 <links>
5055                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5056                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5057                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5058                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5059                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5060                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5061                 </links>
5062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5063                         <actions>
5064                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5065                                 <retrieve />
5066                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5067                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5068                         </actions>
5069                 </permacrud>
5070         </class>
5071
5072         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5073                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5074                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5075                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5076                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5077                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5078                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5079                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5080                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5081                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5082                 </fields>
5083                 <links>
5084                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5085                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5086                 </links>
5087         </class>
5088
5089         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5090                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5091                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5092                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5093                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5094                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5095                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5096                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5097                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5098                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5099                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5100                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5101                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5102                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5103                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5104                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5105                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5106                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5107                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5108                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5109                 </fields>
5110                 <links>
5111                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5112                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5113                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5114                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5115                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5116                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5117                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5118                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5119                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5120                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5121                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5122                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5123                 </links>
5124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5125                         <actions>
5126                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5127                                 <retrieve />
5128                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5129                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5130                         </actions>
5131                 </permacrud>
5132         </class>
5133
5134         <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">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5136                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5137                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5138                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5139                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5140                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5141                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5142                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5143                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5144                 </fields>
5145                 <links>
5146                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5147                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5148                 </links>
5149                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5150                         <actions>
5151                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5152                                         <context link="distribution" field="holding_lib" />
5153                                 </create>
5154                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5155                                         <context link="distribution" field="holding_lib" />
5156                                 </retrieve>
5157                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5158                                         <context link="distribution" field="holding_lib" />
5159                                 </update>
5160                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5161                                         <context link="distribution" field="holding_lib" />
5162                                 </delete>
5163                         </actions>
5164                 </permacrud>
5165         </class>
5166
5167         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5168                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5169                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5170                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5171                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5172                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5173                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5174                 </fields>
5175                 <links>
5176                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5177                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5178                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5179                 </links>
5180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5181                         <actions>
5182                                 <create permission="ADMIN_SERIAL_STREAM">
5183                                         <context link="distribution" field="holding_lib" />
5184                                 </create>
5185                                 <retrieve />
5186                                 <update permission="ADMIN_SERIAL_STREAM">
5187                                         <context link="distribution" field="holding_lib" />
5188                                 </update>
5189                                 <delete permission="ADMIN_SERIAL_STREAM">
5190                                         <context link="distribution" field="holding_lib" />
5191                                 </delete>
5192                         </actions>
5193                 </permacrud>
5194         </class>
5195
5196         <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">
5197                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5198                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5199                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5200                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5201                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5202                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5203                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5204                 </fields>
5205                 <links>
5206                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5207                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5208                 </links>
5209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5210                         <actions>
5211                                 <create permission="ADMIN_SERIAL_STREAM">
5212                                         <context link="stream" jump="distribution" field="holding_lib" />
5213                                 </create>
5214                                 <retrieve permission="RECEIVE_SERIAL">
5215                                         <context link="stream" jump="distribution" field="holding_lib" />
5216                                 </retrieve>
5217                                 <update permission="ADMIN_SERIAL_STREAM">
5218                                         <context link="stream" jump="distribution" field="holding_lib" />
5219                                 </update>
5220                                 <delete permission="ADMIN_SERIAL_STREAM">
5221                                         <context link="stream" jump="distribution" field="holding_lib" />
5222                                 </delete>
5223                         </actions>
5224                 </permacrud>
5225         </class>
5226
5227         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5228                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5229                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5230                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5231                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5232                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5233                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5234                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5235                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5236                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5237                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5238                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5239                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5240                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5241                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5242                 </fields>
5243                 <links>
5244                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5245                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5246                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5247                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5248                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5249                 </links>
5250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5251                         <actions>
5252                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5253                                         <context link="subscription" field="owning_lib" />
5254                                 </create>
5255                                 <retrieve/>
5256                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5257                                         <context link="subscription" field="owning_lib" />
5258                                 </update>
5259                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5260                                         <context link="subscription" field="owning_lib" />
5261                                 </delete>
5262                         </actions>
5263                 </permacrud>
5264         </class>
5265
5266         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5267                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5268                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5269                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5270                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5271                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5272                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5273                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5274                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5275                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5276                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5277                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5278                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5279                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5280                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5281                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5282                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5283                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5284                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5285                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5286                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5287                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5288                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5289                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5290                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5291                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5292                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5293                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5294                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5295                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5296                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5297                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5298                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5299                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5300                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5301                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5302                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5303                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5304                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5305                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5306                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5307                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5308                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5309                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5310                 </fields>
5311                 <links>
5312                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5313                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5314                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5315                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5316                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5317                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5318                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5319                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5320                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5321                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5322                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5323                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5324                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5325                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5326                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5327                 </links>
5328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5329                         <actions>
5330                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5331                                 <retrieve/>
5332                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5333                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5334                         </actions>
5335                 </permacrud>
5336         </class>
5337
5338         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5339                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5340                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5341                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5342                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5343                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5344                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5345                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5346                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5347                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5348                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5349                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5350                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5351                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5352                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5353                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5354                 </fields>
5355                 <links>
5356                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5357                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5358                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5359                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5360                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5361                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5362                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5363                 </links>
5364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5365                         <actions>
5366                                 <create permission="ADMIN_SERIAL_ITEM">
5367                                         <context link="stream" jump="distribution" field="holding_lib" />
5368                                 </create>
5369                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5370                                         <context link="stream" jump="distribution" field="holding_lib" />
5371                                 </retrieve>
5372                                 <update permission="ADMIN_SERIAL_ITEM">
5373                                         <context link="stream" jump="distribution" field="holding_lib" />
5374                                 </update>
5375                                 <delete permission="ADMIN_SERIAL_ITEM">
5376                                         <context link="stream" jump="distribution" field="holding_lib" />
5377                                 </delete>
5378                         </actions>
5379                 </permacrud>
5380         </class>
5381
5382         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5383                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5384                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5385                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5386                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5387                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5388                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5389                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5390                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5391                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5392                 </fields>
5393                 <links>
5394                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5395                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5396                 </links>
5397                 <!-- Not available via PCRUD at this time -->
5398         </class>
5399         <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">
5400                 <fields>
5401                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5402                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5403                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5404                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5405                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5406                 </fields>
5407                 <links>
5408                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5409                 </links>
5410         </class>
5411         <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">
5412                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5413                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5414                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5415                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5416                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5417                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5418                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5419                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5420                 </fields>
5421                 <links>
5422                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5423                 </links>
5424         </class>
5425         <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">
5426                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5427                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5428                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5429                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5430                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5431                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5432                 </fields>
5433                 <links>
5434                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5435                 </links>
5436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5437                         <actions>
5438                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5439                                         <context link="distribution" field="holding_lib" />
5440                                 </create>
5441                                 <retrieve/>
5442                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5443                                         <context link="distribution" field="holding_lib" />
5444                                 </update>
5445                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5446                                         <context link="distribution" field="holding_lib" />
5447                                 </delete>
5448                         </actions>
5449                 </permacrud>
5450         </class>
5451
5452         <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">
5453                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5454                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5455                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5456                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5457                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5458                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5459                 </fields>
5460                 <links>
5461                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5462                 </links>
5463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5464                         <actions>
5465                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5466                                         <context link="distribution" field="holding_lib" />
5467                                 </create>
5468                                 <retrieve/>
5469                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5470                                         <context link="distribution" field="holding_lib" />
5471                                 </update>
5472                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5473                                         <context link="distribution" field="holding_lib" />
5474                                 </delete>
5475                         </actions>
5476                 </permacrud>
5477         </class>
5478
5479         <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">
5480                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5481                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5482                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5483                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5484                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5485                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5486                 </fields>
5487                 <links>
5488                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5489                 </links>
5490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5491                         <actions>
5492                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5493                                         <context link="distribution" field="holding_lib" />
5494                                 </create>
5495                                 <retrieve/>
5496                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5497                                         <context link="distribution" field="holding_lib" />
5498                                 </update>
5499                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5500                                         <context link="distribution" field="holding_lib" />
5501                                 </delete>
5502                         </actions>
5503                 </permacrud>
5504         </class>
5505
5506         <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">
5507                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5508                         <field name="id" reporter:datatype="id" />
5509                         <field name="owning_copy" reporter:datatype="link"/>
5510                         <field name="stat_cat" reporter:datatype="link"/>
5511                         <field name="stat_cat_entry" reporter:datatype="link"/>
5512                 </fields>
5513                 <links>
5514                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5515                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5516                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5517                 </links>
5518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5519                         <actions>
5520                                 <retrieve/>
5521                         </actions>
5522                 </permacrud>
5523         </class>
5524         <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">
5525                 <fields oils_persist:primary="code">
5526                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5527                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5528                 </fields>
5529                 <links/>
5530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5531             <actions>
5532                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5533                 <retrieve/>
5534                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5535                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5536             </actions>
5537         </permacrud>
5538         </class>
5539         <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">
5540                 <fields oils_persist:primary="code">
5541                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5542                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5543                 </fields>
5544                 <links/>
5545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5546             <actions>
5547                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5548                 <retrieve/>
5549                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5550                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5551             </actions>
5552         </permacrud>
5553         </class>
5554         <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">
5555                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5556                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5557                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5558                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5559                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5560                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5561                 </fields>
5562                 <links>
5563             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5564         </links>
5565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5566             <actions>
5567                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5568                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5569                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5570                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5571             </actions>
5572         </permacrud>
5573         </class>
5574         <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">
5575                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5576                         <field name="id" reporter:datatype="id" />
5577                         <field name="name" reporter:datatype="text"/>
5578                 </fields>
5579                 <links/>
5580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5581             <actions>
5582                 <create permission="CREATE_LASSO" global_required="true"/>
5583                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5584                 <update permission="UPDATE_LASSO" global_required="true"/>
5585                 <delete permission="DELETE_LASSO" global_required="true"/>
5586             </actions>
5587         </permacrud>
5588         </class>
5589         <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">
5590                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5591                         <field name="id" reporter:datatype="id" />
5592                         <field name="lasso" reporter:datatype="link"/>
5593                         <field name="org_unit" reporter:datatype="org_unit"/>
5594                 </fields>
5595                 <links>
5596                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5597                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5598                 </links>
5599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5600             <actions>
5601                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5602                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5603                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5604                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5605             </actions>
5606         </permacrud>
5607         </class>
5608         <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">
5609                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5610                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5611                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5612                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5613                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5614                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5615                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5616                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5617                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5618                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5619                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5620                 </fields>
5621                 <links>
5622                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5623                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5624                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5625                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5626                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5627                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5628                 </links>
5629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5630             <actions>
5631                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5632                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5633                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5634                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5635             </actions>
5636         </permacrud>
5637         </class>
5638         <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">
5639                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5640                         <field name="id" reporter:datatype="id" />
5641                         <field name="from_org" reporter:datatype="org_unit"/>
5642                         <field name="to_org" reporter:datatype="org_unit"/>
5643                         <field name="prox" reporter:datatype="int" />
5644                 </fields>
5645                 <links>
5646                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5647                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5648                 </links>
5649         </class>
5650         <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">
5651                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5652                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5653                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5654                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5655                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5656                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5657                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5658                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5659                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5660                 </fields>
5661                 <links/>
5662         </class>
5663         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5664                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5665                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5666                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5667                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5668                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5669                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5670                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5671                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5672                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5673                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5674                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5675                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5676                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5677                 </fields>
5678                 <links>
5679                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5680                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5681                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5682                 </links>
5683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5684             <actions>
5685                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5686                 <retrieve/>
5687                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5688                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5689             </actions>
5690         </permacrud>
5691         </class>
5692         <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">
5693                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5694                         <field name="address_type"  reporter:datatype="text"/>
5695                         <field name="city"  reporter:datatype="text"/>
5696                         <field name="country"  reporter:datatype="text"/>
5697                         <field name="county"  reporter:datatype="text"/>
5698                         <field name="id" reporter:datatype="id" />
5699                         <field name="org_unit" reporter:datatype="org_unit"/>
5700                         <field name="post_code"  reporter:datatype="text"/>
5701                         <field name="state"  reporter:datatype="text"/>
5702                         <field name="street1"  reporter:datatype="text"/>
5703                         <field name="street2"  reporter:datatype="text"/>
5704                         <field name="valid" reporter:datatype="bool"/>
5705                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5706                 </fields>
5707                 <links>
5708                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5709                 </links>
5710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5711             <actions>
5712                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5713                 <retrieve/>
5714                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5715                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5716             </actions>
5717         </permacrud>
5718         </class>
5719         <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">
5720                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5721                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5722                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5723                         <field name="query_text" reporter:datatype="text"/>
5724                 </fields>
5725         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5726             <actions>
5727                 <retrieve/>
5728             </actions>
5729         </permacrud>
5730         </class>
5731
5732         <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">
5733                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5734                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5735                         <field name="owner" reporter:datatype="org_unit"/>
5736                         <field name="code" reporter:datatype="text"/>
5737                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5738                         <field name="create_date" reporter:datatype="timestamp"/>
5739                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5740                 </fields>
5741                 <links>
5742                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5743                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5744                 </links>
5745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5746             <actions>
5747                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5748                 <retrieve/>
5749                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5750                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5751             </actions>
5752         </permacrud>
5753         </class>
5754         <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">
5755                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5756                         <field name="id" reporter:datatype="id"/>
5757                         <field name="grp" reporter:datatype="link"/>
5758                         <field name="pos" reporter:datatype="int"/>
5759                         <field name="query" reporter:datatype="link"/>
5760                 </fields>
5761                 <links>
5762                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5763                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5764                 </links>
5765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5766             <actions>
5767                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5768                     <context link="grp" field="owner"/>
5769                 </create>
5770                 <retrieve/>
5771                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5772                     <context link="grp" field="owner"/>
5773                 </update>
5774                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5775                     <context link="grp" field="owner"/>
5776                 </delete>
5777             </actions>
5778         </permacrud>
5779         </class>
5780
5781         <!-- A note: Please update alhr and ahopl when updating ahr -->
5782         <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">
5783                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5784                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5785                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5786                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5787                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5788                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5789                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5790                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5791                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5792                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5793                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5794                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5795                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5796                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5797                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5798                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5799                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5800                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5801                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5802                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5803                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5804                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5805                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5806                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5807                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5808                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5809                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5810                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5811                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5812                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5813                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5814                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5815                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5816                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5817                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5818                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5819                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5820                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5821                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5822                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5823                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5824                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5825                 </fields>
5826                 <links>
5827                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5828                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5829                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5830                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5831                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5832                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5833                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5834                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5835                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5836                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5837                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5838                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5839                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5840                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5841                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5842                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5843                 </links>
5844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5845                         <actions>
5846                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5847                         </actions>
5848                 </permacrud>
5849         </class>
5850         <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">
5851                 <oils_persist:source_definition><![CDATA[
5852                 SELECT
5853                         ahr.*,
5854                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5855                                 copy_location_order_position,
5856                         CASE WHEN au.alias IS NOT NULL THEN
5857                                 au.alias
5858                         ELSE
5859                                 au.first_given_name
5860                         END AS usr_alias_or_first_given_name,
5861                         au.first_given_name AS usr_first_given_name,
5862                         au.second_given_name AS usr_second_given_name,
5863                         au.family_name AS usr_family_name,
5864                         au.prefix AS usr_prefix,
5865                         au.suffix AS usr_suffix,
5866                         au.alias AS usr_alias,
5867                         CASE WHEN au.alias IS NOT NULL THEN
5868                                 au.alias
5869                         ELSE
5870                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5871                                         COALESCE(au.family_name, ''),
5872                                         COALESCE(au.suffix, ''),
5873                                         ', ',
5874                                         COALESCE(au.prefix, ''),
5875                                         COALESCE(au.first_given_name, ''),
5876                                         COALESCE(au.second_given_name, '')
5877                                 ], ' '), E'\\s+,', ',')
5878                         END AS usr_alias_or_display_name,
5879                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5880                                 COALESCE(au.family_name, ''),
5881                                 COALESCE(au.suffix, ''),
5882                                 ', ',
5883                                 COALESCE(au.prefix, ''),
5884                                 COALESCE(au.first_given_name, ''),
5885                                 COALESCE(au.second_given_name, '')
5886                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5887                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5888                                 AS call_number_label,
5889                         siss.label AS issuance_label,
5890                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5891                         ahcm_1.copy_count AS potential_copies
5892                 FROM action.hold_request ahr
5893                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5894                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5895                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5896                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5897                 JOIN actor.usr au ON (au.id = ahr.usr)
5898                 JOIN (
5899                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5900                         FROM asset.copy_location
5901                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5902                 LEFT JOIN actor.usr_standing_penalty ausp 
5903                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5904                 LEFT JOIN config.standing_penalty csp
5905                         ON (
5906                                 csp.id = ausp.standing_penalty AND 
5907                                 csp.block_list LIKE '%CAPTURE%' AND (
5908                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5909                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5910                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5911                                         )
5912                                 )
5913                         )
5914                 JOIN (
5915                         SELECT COUNT(target_copy) AS copy_count, hold
5916                         FROM action.hold_copy_map
5917                         GROUP BY 2
5918                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5919                 LEFT JOIN serial.issuance siss
5920                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5921                 LEFT JOIN asset.copy_location_order acplo
5922                         ON (acp.location = acplo.location AND
5923                                 acp.circ_lib = acplo.org)
5924                 WHERE
5925                         ahr.capture_time IS NULL AND
5926                         ahr.cancel_time IS NULL AND
5927                         csp.id IS NULL AND
5928                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5929                         acp.status IN (0,7)
5930                 ]]></oils_persist:source_definition>
5931                 <fields oils_persist:primary="id">
5932                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5933                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5934                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5935                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5936                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5937                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5938                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5939                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5940                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5941                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5942                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5943                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5944                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5945                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5946                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5947                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5948                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5949                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5950                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5951                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5952                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5953                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5954                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5955                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5956                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5957                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5958                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5959                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5960                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5961                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5962                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5963                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5964                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5965                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5966                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5967                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5968                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5969                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5970                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5971                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5972                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5973                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5974                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5975                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5976                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5977                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5978                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5979                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5980                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5981                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5982                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5983                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5984                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5985                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5986                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5987                 </fields>
5988                 <links>
5989                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5990                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5991                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5992                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5993                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5994                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5995                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5996                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5997                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5998                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5999                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6000                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6001                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6002                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6003                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6004                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6005                 </links>
6006                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6007                         <actions>
6008                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6009                         </actions>
6010                 </permacrud>
6011         </class>
6012         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6013                 <oils_persist:source_definition>
6014                         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)
6015                 </oils_persist:source_definition>
6016                 <fields oils_persist:primary="id">
6017                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6018                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6019                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6020                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6021                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6022                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6023                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6024                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6025                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6026                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6027                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6028                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6029                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6030                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6031                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6032                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6033                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6034                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6035                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6036                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6037                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6038                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6039                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6040                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6041                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6042                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6043                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6044                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6045                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6046                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6047                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6048                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6049                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6050                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6051                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6052                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6053                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6054                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6055                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6056                 </fields>
6057                 <links>
6058                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6059                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6060                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6061                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6062                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6063                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6064                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6065                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6066                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6067                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6068                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6069                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6070                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6071                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6072                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6073                 </links>
6074         </class>
6075
6076         <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">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6078                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6079                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6080                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6081                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6082                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6083                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6084                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6085                 </fields>
6086                 <links>
6087                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6088                 </links>
6089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6090                         <actions>
6091                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6092                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6093                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6094                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6095                         </actions>
6096                 </permacrud>
6097         </class>
6098         <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">
6099                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6100                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6101                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6102                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6103                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6104                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6105                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6106                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6107                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6108                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6109                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6110                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6111                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6112                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6113                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6114                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6115                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6116                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6117                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6118                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6119                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6120                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6121                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6122                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6123                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6124                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6125                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6126                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6127                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6128                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6129                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6130                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6131                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6132                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6133                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6134                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6135                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6136                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6137                 </fields>
6138                 <links>
6139                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6140                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6141                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6142                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6143                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6144                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6145                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6146                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6147                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6148                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6149                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6150                 </links>
6151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6152                         <actions>
6153                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6154                         </actions>
6155                 </permacrud>
6156         </class>
6157         <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">
6158                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6159                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6160                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6161                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6162                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6163                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6164                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6165                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6166                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6167                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6168                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6169                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6170                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6171                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6172                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6173                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6174                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6175                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6176                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6177                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6178                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6179                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6180                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6181                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6182                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6183                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6184                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6185                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6186                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6187                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6188                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6189                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6190                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6191                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6192                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6193                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6194                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6195                 </fields>
6196                 <links>
6197                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6198                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6199                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6200                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6201                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6202                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6203                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6204                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6205                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6206                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6207                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6208                 </links>
6209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6210                         <actions>
6211                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6212                         </actions>
6213                 </permacrud>
6214         </class>
6215
6216         <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">
6217                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6218                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6219                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6220                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6221                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6222                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6223                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6224                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6225                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6226                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6227                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6228                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6229                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6230                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6231                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6232                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6233                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6234                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6235                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6236                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6237                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6238                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6239                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6240                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6241                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6242                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6243                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6244                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6245                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6246                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6247                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6248                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6249                 </fields>
6250                 <links>
6251                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6252                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6253                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6254                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6255                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6256                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6257                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6258                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6259                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6260                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6261                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6262                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6263                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6264                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6265                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6266                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6267                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6268                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6269                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6270                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6271                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6272                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6273                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6274                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6275                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6276                 </links>
6277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6278             <actions>
6279                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6280                 <retrieve />
6281                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6282                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6283             </actions>
6284         </permacrud>
6285         </class>
6286         <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">
6287                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6288                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6289                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6290                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6291                 </fields>
6292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6293                         <actions>
6294                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6295                                 <retrieve/>
6296                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6297                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6298                         </actions>
6299                 </permacrud>
6300         </class>
6301         <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">
6302                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6303                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6304                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6305                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6306                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6307                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6308                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6309                 </fields>
6310                 <links>
6311                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6312                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6313                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6314                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6315                 </links>
6316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6317                         <actions>
6318                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6319                                 <retrieve/>
6320                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6321                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6322                         </actions>
6323                 </permacrud>
6324         </class>
6325         <class id="ccnb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6326                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6327                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6328                         <field name="btype" reporter:datatype="text"/>
6329                         <field name="id" reporter:datatype="id" />
6330                         <field name="name"  reporter:datatype="text"/>
6331                         <field name="description" reporter:datatype="text"/>
6332                         <field name="owner" reporter:datatype="link"/>
6333                         <field name="pub" reporter:datatype="bool"/>
6334                         <field name="create_time" reporter:datatype="timestamp" />
6335                         <field name="owning_lib" reporter:datatype="org_unit" />
6336                 </fields>
6337                 <links>
6338                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6339                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6340                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6341                 </links>
6342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6343                         <actions>
6344                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6345                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6346                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6347                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6348                         </actions>
6349                 </permacrud>
6350         </class>
6351         <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">
6352                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6353                         <field name="id" reporter:datatype="id" />
6354                         <field name="bucket" reporter:datatype="link"/>
6355                         <field name="note" reporter:datatype="text" />
6356                 </fields>
6357                 <links>
6358                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6359                 </links>
6360         </class>
6361         <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">
6362                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6363                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6364                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6365                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6366                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6367                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6368                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6369                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6370                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6371                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6372                 </fields>
6373                 <links>
6374                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6375                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6376                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6377                 </links>
6378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6379                         <actions>
6380                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6381                         </actions>
6382                 </permacrud>
6383         </class>
6384         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6385                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6386                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6387                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6388                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6389                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6390                 </fields>
6391                 <links>
6392                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6393                 </links>
6394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6395                         <actions>
6396                                 <retrieve permission="VIEW_USER">
6397                                         <context link="usr" field="home_ou" />
6398                                 </retrieve>
6399                         </actions>
6400                 </permacrud>
6401         </class>
6402     <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">
6403         <fields oils_persist:primary="field">
6404             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6405             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6406             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6407         </fields>
6408         <links/>
6409         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6410             <actions>
6411                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6412                 <retrieve />
6413                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6414                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6415             </actions>
6416         </permacrud>
6417     </class>
6418         <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">
6419                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6420                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6421                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6422                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6423                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6424                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6425                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6426                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6427                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6428                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6429                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6430                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6431                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6432                 </fields>
6433                 <links>
6434                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6435                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6436                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6437                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6438                 </links>
6439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6440             <actions>
6441                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6442                 <retrieve />
6443                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6444                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6445             </actions>
6446         </permacrud>
6447         </class>
6448         <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">
6449                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6450                         <field name="field" reporter:datatype="link"/>
6451                         <field name="id" reporter:datatype="id" />
6452                         <field name="source" reporter:datatype="link"/>
6453                         <field name="value"  reporter:datatype="text"/>
6454                 </fields>
6455                 <links>
6456                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6457                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6458                 </links>
6459         </class>
6460         <class id="cub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6461                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6462                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6463                         <field name="btype" reporter:datatype="text"/>
6464                         <field name="id" reporter:datatype="id" />
6465                         <field name="name"  reporter:datatype="text"/>
6466                         <field name="description" reporter:datatype="text"/>
6467                         <field name="owner" reporter:datatype="link"/>
6468                         <field name="pub" reporter:datatype="bool"/>
6469                         <field name="create_time" reporter:datatype="timestamp" />
6470                         <field name="owning_lib" reporter:datatype="org_unit" />
6471                 </fields>
6472                 <links>
6473                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6474                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6475                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6476                 </links>
6477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6478                         <actions>
6479                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6480                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6481                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6482                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6483                         </actions>
6484                 </permacrud>
6485         </class>
6486         <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">
6487                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6488                         <field name="id" reporter:datatype="id" />
6489                         <field name="bucket" reporter:datatype="link"/>
6490                         <field name="note" reporter:datatype="text" />
6491                 </fields>
6492                 <links>
6493                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6494                 </links>
6495         </class>
6496         <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">
6497                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6498                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6499                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6500                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6501                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6502                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6503                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6504                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6505                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6506                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6507                 </fields>
6508                 <links>
6509                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6510                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6511                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6512                 </links>
6513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6514             <actions>
6515                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6516                     <context link="xact" jump="usr" field="home_ou"/>
6517                 </retrieve>
6518                         </actions>
6519                 </permacrud>
6520         </class>
6521         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6522                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6523                         <field name="id" reporter:datatype="id" />
6524                         <field name="ind1" />
6525                         <field name="ind2" />
6526                         <field name="record" />
6527                         <field name="subfield" />
6528                         <field name="tag" />
6529                         <field name="value" />
6530                 </fields>
6531                 <links>
6532                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6533                 </links>
6534         </class>
6535         <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">
6536                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6537                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6538                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6539                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6540                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6541                 </fields>
6542                 <links>
6543                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6544                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6545                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6546                 </links>
6547         </class>
6548         <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">
6549                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6550                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6551                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6552                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6553                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6554                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6555                 </fields>
6556                 <links>
6557                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6558                 </links>
6559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6560             <actions>
6561                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6562                 <retrieve/>
6563                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6564                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6565             </actions>
6566         </permacrud>
6567
6568         </class>
6569         <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">
6570                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6571                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6572                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6573                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6574                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6575                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6576                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6577                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6578                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6579                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6580                 </fields>
6581                 <links>
6582                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6583                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6584                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6585                 </links>
6586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6587             <actions>
6588                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6589                 <retrieve/>
6590                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6591                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6592             </actions>
6593         </permacrud>
6594         </class>
6595         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6596                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6597                         <field name="create_date" reporter:datatype="timestamp"/>
6598                         <field name="creator" reporter:datatype="link"/>
6599                         <field name="edit_date" reporter:datatype="timestamp"/>
6600                         <field name="editor" reporter:datatype="link"/>
6601                         <field name="id" reporter:datatype="id" />
6602                         <field name="pub" reporter:datatype="bool"/>
6603                         <field name="record" reporter:datatype="link"/>
6604                         <field name="value"  reporter:datatype="text"/>
6605                 </fields>
6606                 <links>
6607                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6608                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6609                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6610                 </links>
6611         </class>
6612         <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">
6613                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6614                         <field name="balance_owed" reporter:datatype="money" />
6615                         <field name="total_owed" reporter:datatype="money" />
6616                         <field name="total_paid" reporter:datatype="money" />
6617                         <field name="usr" reporter:datatype="link"/>
6618                 </fields>
6619                 <links>
6620                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6621                 </links>
6622         </class>
6623     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6624                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6625                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6626                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6627                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6628                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6629                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6630                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6631                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6632                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6633                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6634                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6635                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6636                 </fields>
6637                 <links>
6638                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6639                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6640                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6641                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6642                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6643                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6644                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6645                 </links>
6646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6647             <actions>
6648                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6649             </actions>
6650         </permacrud>
6651         </class>
6652         <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">
6653                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6654                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6655                         <field name="quality" reporter:datatype="int" />
6656                         <field name="source" reporter:datatype="text"/>
6657                         <field name="transcendant" reporter:datatype="bool"/>
6658                         <field name="can_have_copies" reporter:datatype="bool"/>
6659                 </fields>
6660                 <links/>
6661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6662             <actions>
6663                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6664                 <retrieve/>
6665                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6666                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6667             </actions>
6668         </permacrud>
6669         </class>
6670         <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">
6671                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6672                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6673                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6674                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6675                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6676                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6677                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6678                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6679                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6680                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6681                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6682                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6683                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6684                 </fields>
6685                 <links>
6686                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6687                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6688                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6689                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6690                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6691                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6692                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6693                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6694                 </links>
6695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6696                         <actions>
6697                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6698                                         <context link="usr" field="home_ou" />
6699                                 </retrieve>
6700                         </actions>
6701                 </permacrud>
6702         </class>
6703         <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">
6704                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6705                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6706                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6707                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6708                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6709                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6710                 </fields>
6711                 <links>
6712                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6713                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6714                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6715                 </links>
6716         </class>
6717         <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">
6718                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6719                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6720                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6721                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6722                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6723                 </fields>
6724                 <links>
6725                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6727                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6728                 </links>
6729         </class>
6730         <class id="cubi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
6731                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6732                         <field name="bucket" reporter:datatype="link"/>
6733                         <field name="id" reporter:datatype="id" />
6734                         <field name="target_user" reporter:datatype="link"/>
6735                         <field name="create_time" reporter:datatype="timestamp" />
6736                         <field name="pos" reporter:datatype="int" />
6737                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6738                 </fields>
6739                 <links>
6740                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6741                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6742             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6743                 </links>
6744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6745                         <actions>
6746                                 <retrieve permission="ADMIN_USER_BUCKET">
6747                     <context link="bucket" owning_lib="owning_lib"/>
6748                 </retrieve>
6749             </actions>
6750         </permacrud>
6751         </class>
6752         <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">
6753                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6754                         <field name="id" reporter:datatype="id" />
6755                         <field name="item" reporter:datatype="link"/>
6756                         <field name="note" reporter:datatype="text" />
6757                 </fields>
6758                 <links>
6759                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6760                 </links>
6761         </class>
6762         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6763                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6764                         <field name="balance_owed" reporter:datatype="money" />
6765                         <field name="total_owed" reporter:datatype="money" />
6766                         <field name="total_paid" reporter:datatype="money" />
6767                         <field name="usr" reporter:datatype="link"/>
6768                 </fields>
6769                 <links>
6770                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6771                 </links>
6772         </class>
6773         <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">
6774                 <fields oils_persist:primary="code" oils_persist:sequence="">
6775                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6776                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6777                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6778                 </fields>
6779                 <links/>
6780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6781             <actions>
6782                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6783                 <retrieve/>
6784                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6785                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6786             </actions>
6787         </permacrud>
6788         </class>
6789         <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">
6790                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6791                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6792                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6793                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6794                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6795                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6796                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6797                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6798                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6799                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6800                 </fields>
6801                 <links>
6802                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6803                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6804                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6805                 </links>
6806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6807             <actions>
6808                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6809                     <context link="xact" jump="usr" field="home_ou"/>
6810                 </retrieve>
6811                         </actions>
6812                 </permacrud>
6813         </class>
6814         <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">
6815                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6816                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6817                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6818                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6819                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6820                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6821                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6822                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6823                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6824                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6825                 </fields>
6826                 <links>
6827                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6828                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6829                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6830                 </links>
6831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6832             <actions>
6833                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6834                     <context link="xact" jump="usr" field="home_ou"/>
6835                 </retrieve>
6836                         </actions>
6837                 </permacrud>
6838         </class>
6839         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6840                 <fields oils_persist:primary="id" oils_persist:sequence="">
6841                         <field name="checkin_lib" reporter:datatype="link"/>
6842                         <field name="checkin_staff" reporter:datatype="link"/>
6843                         <field name="checkin_time" reporter:datatype="timestamp"/>
6844                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6845                         <field name="circ_staff" reporter:datatype="link"/>
6846                         <field name="desk_renewal" reporter:datatype="bool"/>
6847                         <field name="due_date" reporter:datatype="timestamp"/>
6848                         <field name="duration" reporter:datatype="interval"/>
6849                         <field name="duration_rule" reporter:datatype="link"/>
6850                         <field name="fine_interval" reporter:datatype="interval"/>
6851                         <field name="id" reporter:datatype="id" />
6852                         <field name="max_fine" reporter:datatype="money" />
6853                         <field name="max_fine_rule" reporter:datatype="link"/>
6854                         <field name="opac_renewal" reporter:datatype="bool"/>
6855                         <field name="phone_renewal" reporter:datatype="bool"/>
6856                         <field name="recurring_fine" reporter:datatype="money" />
6857                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6858                         <field name="renewal_remaining" reporter:datatype="int" />
6859             <field name="grace_period" reporter:datatype="interval" />
6860                         <field name="stop_fines" reporter:datatype="text"/>
6861                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6862                         <field name="target_copy" reporter:datatype="link"/>
6863                         <field name="usr" reporter:datatype="link"/>
6864                         <field name="xact_finish" reporter:datatype="timestamp" />
6865                         <field name="xact_start" reporter:datatype="timestamp" />
6866                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6867                 </fields>
6868                 <links>
6869                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6870                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6871                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6872                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6873                 </links>
6874         </class>
6875         <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">
6876                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6877                         <field name="field" reporter:datatype="link"/>
6878                         <field name="id" reporter:datatype="id" />
6879                         <field name="source" reporter:datatype="link"/>
6880                         <field name="value" reporter:datatype="text"/>
6881                 </fields>
6882                 <links>
6883                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6884                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6885                 </links>
6886         </class>
6887         <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">
6888                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6889                         <field name="high" reporter:datatype="money" />
6890                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6891                         <field name="low" reporter:datatype="money" />
6892                         <field name="name" reporter:datatype="text"/>
6893                         <field name="normal" reporter:datatype="money" />
6894                         <field name="recurrence_interval" reporter:datatype="interval"/>
6895             <field name="grace_period" reporter:datatype="interval" />
6896                 </fields>
6897                 <links/>
6898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6899             <actions>
6900                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6901                 <retrieve/>
6902                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6903                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6904             </actions>
6905         </permacrud>
6906         </class>
6907         <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">
6908                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6909                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6910                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6911                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6912                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6913                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6914                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6915                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6916                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6917                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6918                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6919                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6920                 </fields>
6921                 <links>
6922                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6923                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6924                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6925                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6926                 </links>
6927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6928             <actions>
6929                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6930                     <context link="xact" jump="usr" field="home_ou"/>
6931                 </retrieve>
6932                         </actions>
6933                 </permacrud>
6934         </class>
6935         <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">
6936                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6937                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6938                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6939                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6940                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6941                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6942                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6943                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6944                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6945                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6946                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6947                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6948                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6949                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6950                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6951                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6952                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6953                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6954                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6955                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6956                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6957                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6958                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6959                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6960                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6961                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6962                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6963                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6964                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6965                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6966                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6967                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6968                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6969                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6970                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6971                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6972                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6973                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6974                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6975                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6976                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6977                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6978                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6979                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6980                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6981                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6982                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6983                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6984                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6985                 </fields>
6986                 <links>
6987                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6988                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6989                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6990                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6991                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6992                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6993                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6994                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6995                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6996                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6997                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6998                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6999                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7000                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7001                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7002                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7003                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7004                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7005                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7006                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7007                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7008                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7009                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7010                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7011                 </links>
7012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7013             <actions>
7014                 <create permission="CREATE_COPY">
7015                     <context link="call_number" field="owning_lib"/>
7016                 </create>
7017                 <retrieve/>
7018                 <update permission="UPDATE_COPY">
7019                     <context link="call_number" field="owning_lib"/>
7020                 </update>
7021                 <delete permission="DELETE_COPY">
7022                     <context link="call_number" field="owning_lib"/>
7023                 </delete>
7024             </actions>
7025         </permacrud>
7026         </class>
7027
7028         <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">
7029                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7030                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7031                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7032                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7033                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7034                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7035                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7036                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7037                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7038                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7039                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7040                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7041                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7042                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7043                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7044                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7045                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7046                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7047                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7048                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7049                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7050                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7051                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7052                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7053                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7054                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7055                 </fields>
7056                 <links>
7057                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7058                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7059                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7060                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7061                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7062                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7063                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7064                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7065                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7066                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7067                 </links>
7068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7069                         <actions>
7070                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7071                                 <retrieve />
7072                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7073                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7074                         </actions>
7075                 </permacrud>
7076         </class>
7077
7078         <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">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7080                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7081                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7082                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7083                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7084                 </fields>
7085                 <links/>
7086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7087             <actions>
7088                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7089                 <retrieve/>
7090                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7091                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7092             </actions>
7093         </permacrud>
7094         </class>
7095         <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">
7096                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7097                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7098                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7099                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7100                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7101                 </fields>
7102                 <links/>
7103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7104             <actions>
7105                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7106                 <retrieve/>
7107                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7108                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7109             </actions>
7110         </permacrud>
7111         </class>
7112         <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">
7113                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7114                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7115                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7116                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7117                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7118                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7119                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7120                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7121                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7122                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7123                 </fields>
7124                 <links>
7125                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7126                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7127                 </links>
7128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7129             <actions>
7130                 <create permission="CREATE_PERM" global_required="true"/>
7131                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7132                 <update permission="UPDATE_PERM" global_required="true"/>
7133                 <delete permission="DELETE_PERM" global_required="true"/>
7134             </actions>
7135         </permacrud>
7136         </class>
7137         <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">
7138                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7139                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7140                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7141                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7142                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7143                 </fields>
7144                 <links>
7145                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7146                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7147                 </links>
7148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7149             <actions>
7150                 <create permission="ADMIN_SURVEY">
7151                     <context link="question" jump="survey" field="owner"/>
7152                 </create>
7153                 <retrieve/>
7154                 <update permission="ADMIN_SURVEY">
7155                     <context link="question" jump="survey" field="owner"/>
7156                 </update>
7157                 <delete permission="ADMIN_SURVEY">
7158                     <context link="question" jump="survey" field="owner"/>
7159                 </delete>
7160             </actions>
7161         </permacrud>
7162         </class>
7163         <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">
7164                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7165                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7166                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7167                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7168                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7169                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7170                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7171                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7172                 </fields>
7173                 <links>
7174                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7175                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7176                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7177                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7178                 </links>
7179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7180                         <actions>
7181                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7182                         </actions>
7183                 </permacrud>
7184         </class>
7185         <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">
7186                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7187                         <field name="balance_owed" reporter:datatype="money" />
7188                         <field name="total_owed" reporter:datatype="money" />
7189                         <field name="total_paid" reporter:datatype="money" />
7190                         <field name="usr" reporter:datatype="link"/>
7191                 </fields>
7192                 <links>
7193                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7194                 </links>
7195         </class>
7196         <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">
7197                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7198                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7199                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7200                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7201                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7202                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7203                 </fields>
7204                 <links>
7205                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7206                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7207                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7208                 </links>
7209         </class>
7210         <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">
7211                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7212                         <field name="field" reporter:datatype="link"/>
7213                         <field name="id" reporter:datatype="id" />
7214                         <field name="source" reporter:datatype="link"/>
7215                         <field name="value" reporter:datatype="text"/>
7216                 </fields>
7217                 <links>
7218                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7219                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7220                 </links>
7221         </class>
7222         <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">
7223                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7224                         <field name="field" reporter:datatype="link"/>
7225                         <field name="id" reporter:datatype="id" />
7226                         <field name="source" reporter:datatype="link"/>
7227                         <field name="value" reporter:datatype="text"/>
7228                 </fields>
7229                 <links>
7230                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7231                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7232                 </links>
7233         </class>
7234         <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">
7235                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7236                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7237                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7238                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7239                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7240                 </fields>
7241                 <links>
7242                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7243                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7244                 </links>
7245         </class>
7246         <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">
7247                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7248                         <field name="depth" reporter:datatype="int" />
7249                         <field name="grantable" reporter:datatype="bool"/>
7250                         <field name="grp" reporter:datatype="link"/>
7251                         <field name="id" reporter:datatype="id" />
7252                         <field name="perm" reporter:datatype="link"/>
7253                 </fields>
7254                 <links>
7255                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7256                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7257                 </links>
7258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7259             <actions>
7260                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7261                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7262                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7263                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7264             </actions>
7265         </permacrud>
7266         </class>
7267         <class id="ccb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7268                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7269                         <field name="items" oils_persist:virtual="true" />
7270                         <field name="btype" reporter:datatype="text"/>
7271                         <field name="id" reporter:datatype="id" />
7272                         <field name="name" reporter:datatype="text"/>
7273                         <field name="description" reporter:datatype="text"/>
7274                         <field name="owner" reporter:datatype="link"/>
7275                         <field name="pub" reporter:datatype="bool"/>
7276                         <field name="create_time" reporter:datatype="timestamp" />
7277                         <field name="owning_lib" reporter:datatype="org_unit" />
7278                 </fields>
7279                 <links>
7280                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7281                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7282                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7283                 </links>
7284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7285                         <actions>
7286                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7287                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7288                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7289                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7290                         </actions>
7291                 </permacrud>
7292         </class>
7293         <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">
7294                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7295                         <field name="id" reporter:datatype="id" />
7296                         <field name="bucket" reporter:datatype="link"/>
7297                         <field name="note" reporter:datatype="text" />
7298                 </fields>
7299                 <links>
7300                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7301                 </links>
7302         </class>
7303         <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">
7304                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7305                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7306                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7307                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7308                 </fields>
7309                 <links>
7310                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7311                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7312                 </links>
7313         </class>
7314         <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">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7316                         <field name="depth" reporter:datatype="int"/>
7317                         <field name="grantable" reporter:datatype="bool"/>
7318                         <field name="id" reporter:datatype="id" />
7319                         <field name="perm" reporter:datatype="link"/>
7320                         <field name="usr" reporter:datatype="link"/>
7321                 </fields>
7322                 <links>
7323                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7324                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7325                 </links>
7326         </class>
7327         <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">
7328                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7329                         <field name="object_id" reporter:datatype="text"/>
7330                         <field name="grantable" reporter:datatype="bool"/>
7331                         <field name="id" reporter:datatype="id" />
7332                         <field name="perm" reporter:datatype="link"/>
7333                         <field name="usr" reporter:datatype="link"/>
7334                         <field name="object_type" reporter:datatype="text"/>
7335                 </fields>
7336                 <links>
7337                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7338                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7339                 </links>
7340         </class>
7341         <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">
7342                 <fields oils_persist:primary="id" oils_persist:sequence="">
7343                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7344                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7345                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7346                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7347                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7348                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7349                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7350                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7351                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7352                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7353                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7354                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7355                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7356                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7357                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7358                 </fields>
7359                 <links>
7360                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7361                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7362                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7363                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7364                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7365                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7366                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7367                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7368                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7369                 </links>
7370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7371             <actions>
7372                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7373                     <context link="xact" jump="usr" field="home_ou"/>
7374                 </retrieve>
7375                         </actions>
7376                 </permacrud>
7377         </class>
7378         <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">
7379                 <fields oils_persist:primary="id" oils_persist:sequence="">
7380                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7381                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7382                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7383                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7384                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7385                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7386                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7387                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7388                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7389                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7390                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7391                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7392                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7393                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7394                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7395                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7396                 </fields>
7397                 <links>
7398                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7399                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7400                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7401                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7402                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7403                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7404                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7405                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7406                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7407                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7408                 </links>
7409         </class>
7410         <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">
7411                 <fields oils_persist:primary="id" oils_persist:sequence="">
7412                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7413                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7414                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7415                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7416                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7417                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7418                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7419                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7420                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7421                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7422                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7423                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7424                 </fields>
7425                 <links>
7426                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7427                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7428                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7429                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7430                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7431                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7432                 </links>
7433         </class>
7434         <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">
7435                 <fields oils_persist:primary="id" oils_persist:sequence="">
7436                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7437                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7438                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7439                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7440                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7441                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7442                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7443                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7444                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7445                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7446                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7447                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7448                 </fields>
7449                 <links>
7450                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7451                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7452                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7453                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7454                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7455                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7456                 </links>
7457         </class>
7458         <class id="cbrebi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
7459                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7460                         <field name="bucket" reporter:datatype="link"/>
7461                         <field name="id" reporter:datatype="id" />
7462                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7463                         <field name="create_time" reporter:datatype="timestamp" />
7464                         <field name="pos" reporter:datatype="int" />
7465                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7466                 </fields>
7467                 <links>
7468                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7469                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7470             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7471                 </links>
7472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7473                         <actions>
7474                                 <retrieve permission="ADMIN_COPY_BUCKET">
7475                     <context link="bucket" owning_lib="owning_lib"/>
7476                 </retrieve>
7477             </actions>
7478         </permacrud>
7479         </class>
7480         <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">
7481                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7482                         <field name="id" reporter:datatype="id" />
7483                         <field name="item" reporter:datatype="link"/>
7484                         <field name="note" reporter:datatype="text" />
7485                 </fields>
7486                 <links>
7487                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7488                 </links>
7489         </class>
7490         <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">
7491                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7492                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7493                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7494                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7495                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7496                 </fields>
7497                 <links>
7498                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7499                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7500                 </links>
7501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7502                         <actions>
7503                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7504                         </actions>
7505                 </permacrud>
7506         </class>
7507     <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">
7508         <fields oils_persist:primary="field">
7509             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7510             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7511             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7512         </fields>
7513         <links/>
7514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7515             <actions>
7516                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7517                 <retrieve />
7518                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7519                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7520             </actions>
7521         </permacrud>
7522     </class>
7523         <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">
7524                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7525                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7526                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7527                 </fields>
7528                 <links/>
7529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7530             <actions>
7531                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7532                 <retrieve/>
7533                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7534                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7535             </actions>
7536         </permacrud>
7537         </class>
7538
7539
7540         <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">
7541                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7542                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7543                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7544                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7545                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7546                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7547                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7548                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7549                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7550                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7551                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7552                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7553                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7554                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7555                 </fields>
7556                 <links>
7557                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7558                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7559                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7560                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7561                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7562                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7563                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7564                 </links>
7565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7566             <actions>
7567                 <create permission="TRANSIT_COPY">
7568                     <context link="target_copy" field="owner"/>
7569                 </create>
7570                 <retrieve/>
7571                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7572                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7573             </actions>
7574         </permacrud>
7575         </class>
7576         <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">
7577                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7578                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7579                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7580                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7581                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7582                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7583                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7584                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7585                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7586                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7587                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7588                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7589                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7590                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7591                 </fields>
7592                 <links>
7593                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7594                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7595                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7596                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7597                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7598                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7599                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7600                 </links>
7601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7602             <actions>
7603                 <create permission="TRANSIT_COPY" context_field="owner">
7604                     <context link="target_copy" field="circ_lib"/>
7605                 </create>
7606                 <retrieve/>
7607                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7608                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7609             </actions>
7610         </permacrud>
7611         </class>
7612         <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">
7613                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7614                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7615                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7616                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7617                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7618                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7619                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7620                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7621                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7622                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7623                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7624                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7625                 </fields>
7626                 <links>
7627                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7628                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7629                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7630                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7631                 </links>
7632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7633             <actions>
7634                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7635                     <context link="xact" jump="usr" field="home_ou"/>
7636                 </retrieve>
7637                         </actions>
7638                 </permacrud>
7639         </class>
7640         <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">
7641                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7642                         <field name="grp" />
7643                         <field name="id" reporter:datatype="id" />
7644                         <field name="usr" />
7645                 </fields>
7646                 <links>
7647                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7648                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7649                 </links>
7650         </class>
7651         <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">
7652                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7653                         <field name="id" reporter:datatype="id" />
7654                         <field name="fq_field" reporter:datatype="text"/>
7655                         <field name="identity_value" reporter:datatype="text"/>
7656                         <field name="translation" reporter:datatype="text"/>
7657                         <field name="string" reporter:datatype="text"/>
7658                 </fields>
7659                 <links>
7660                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7661                 </links>
7662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7663             <actions>
7664                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7665                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7666                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7667                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7668             </actions>
7669         </permacrud>
7670         </class>
7671         <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">
7672                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7673                         <field name="id" reporter:datatype="id" />
7674                         <field name="fm_class" reporter:datatype="text"/>
7675                         <field name="field" reporter:datatype="text"/>
7676                         <field name="owner" reporter:datatype="org_unit"/>
7677                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7678                 </fields>
7679                 <links>
7680                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7681                 </links>
7682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7683             <actions>
7684                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7685                 <retrieve/>
7686                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7687                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7688             </actions>
7689         </permacrud>
7690         </class>
7691         <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">
7692                 <fields oils_persist:primary="code">
7693                         <field name="code" reporter:datatype="id" />
7694                         <field name="marc_code" reporter:datatype="text"/>
7695                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7696                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7697                         <field name="rtl" reporter:datatype="bool"/>
7698                 </fields>
7699                 <links/>
7700         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7701             <actions>
7702                 <create permission="CREATE_LOCALE" global_required="true"/>
7703                 <retrieve/>
7704                 <update permission="UPDATE_LOCALE" global_required="true"/>
7705                 <delete permission="DELETE_LOCALE" global_required="true"/>
7706             </actions>
7707         </permacrud>
7708         </class>
7709         <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">
7710                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7711                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7712                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7713                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7714             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7715                 </fields>
7716                 <links>
7717                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7718                 </links>
7719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7720             <actions>
7721                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7722                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7723                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7724                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7725             </actions>
7726         </permacrud>
7727         </class>
7728
7729         <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">
7730                 <fields oils_persist:primary="id">
7731                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7732                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7733                 </fields>
7734                 <links/>
7735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7736             <actions>
7737                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7738                 <retrieve/>
7739                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7740                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7741             </actions>
7742         </permacrud>
7743         </class>
7744
7745         <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">
7746                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7747                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7748                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7749                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7750                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7751                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7752                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7753                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7754                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7755                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7756                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7757                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7758                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7759                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7760                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7761                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7762                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7763                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7764                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7765                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7766                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7767                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7768                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7769                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7770                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7771                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7772                 </fields>
7773                 <links>
7774                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7775                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7776                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7777                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7778                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7779                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7780                 </links>
7781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7782             <actions>
7783                 <create permission="user_request.create">
7784                     <context link="usr" field="home_ou"/>
7785                                 </create>
7786                 <retrieve permission="user_request.view">
7787                     <context link="usr" field="home_ou"/>
7788                                 </retrieve>
7789                 <update permission="user_request.update">
7790                     <context link="usr" field="home_ou"/>
7791                                 </update>
7792                 <delete permission="user_request.delete">
7793                     <context link="usr" field="home_ou"/>
7794                                 </delete>
7795             </actions>
7796         </permacrud>
7797         </class>
7798
7799         <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">
7800                 <fields oils_persist:primary="code">
7801                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7802                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7803                 </fields>
7804                 <links/>
7805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7806             <actions>
7807                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7808                 <retrieve/>
7809                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7810                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7811             </actions>
7812         </permacrud>
7813         </class>
7814
7815         <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">
7816                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7817                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7818                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7819                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7820                         <field reporter:label="Ratio" name="ratio" />
7821                 </fields>
7822                 <links>
7823                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7824                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7825                 </links>
7826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7827                         <actions>
7828                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7829                                 <retrieve/>
7830                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7831                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7832                         </actions>
7833                 </permacrud>
7834         </class>
7835
7836         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7837                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7838                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7839                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7840                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7841                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7842                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7843                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7844                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7845                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7846                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7847                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7848                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7849                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7850                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7851                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7852                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7853                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7854                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7855                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
7856                 </fields>
7857                 <links>
7858                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7859                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7860             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7861             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7862                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7863                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
7864                 </links>
7865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7866             <actions>
7867                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7868                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7869                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7870                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7871             </actions>
7872         </permacrud>
7873         </class>
7874
7875         <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">
7876                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7877                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7878                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7879                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7880                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7881                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7882                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7883                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7884                 </fields>
7885                 <links>
7886                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7887                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7888                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7889                 </links>
7890         </class>
7891
7892         <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">
7893                 <fields oils_persist:primary="code">
7894                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7895                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7896                 </fields>
7897                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7898             <actions>
7899                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7900                 <retrieve/>
7901                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7902                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7903             </actions>
7904                 </permacrud>
7905         </class>
7906
7907         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7908                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7909                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7910                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7911                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7912                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7913                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7914                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7915                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7916                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7917                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7918                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7919                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7920                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7921                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7922                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7923                 </fields>
7924                 <links>
7925                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7926                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7927                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7928                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7929                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7930                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7931                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7932                 </links>
7933         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7934             <actions>
7935                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7936                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7937                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7938                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7939             </actions>
7940         </permacrud>
7941         </class>
7942
7943         <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">
7944                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7945                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7946                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7947                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7948                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7949                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7950                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7951                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7952                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7953                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7954                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7955                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7956                 </fields>
7957                 <links>
7958                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7959                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7960                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7961                 </links>
7962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7963             <actions>
7964                 <create   permission="ADMIN_INVOICE">
7965                                         <context link="invoice" field="receiver"/>
7966                                 </create>
7967                 <retrieve permission="ADMIN_INVOICE">
7968                                         <context link="invoice" field="receiver"/>
7969                                 </retrieve>
7970                 <update   permission="ADMIN_INVOICE">
7971                                         <context link="invoice" field="receiver"/>
7972                                 </update>
7973                                 <delete   permission="ADMIN_INVOICE">
7974                                         <context link="invoice" field="receiver"/>
7975                                 </delete>
7976             </actions>
7977         </permacrud>
7978         </class>
7979
7980         <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">
7981                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7982                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7983                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7984                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7985                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7986                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7987                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7988                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7989                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7990                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7991                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7992                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7993                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7994                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7995                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7996                 </fields>
7997                 <links>
7998                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7999                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8000                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8001                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8002                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8003                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8004                 </links>
8005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8006             <actions>
8007                 <create   permission="ADMIN_INVOICE">
8008                                         <context link="invoice" field="receiver"/>
8009                                 </create>
8010                 <retrieve permission="ADMIN_INVOICE">
8011                                         <context link="invoice" field="receiver"/>
8012                                 </retrieve>
8013                 <update   permission="ADMIN_INVOICE">
8014                                         <context link="invoice" field="receiver"/>
8015                                 </update>
8016                                 <delete   permission="ADMIN_INVOICE">
8017                                         <context link="invoice" field="receiver"/>
8018                                 </delete>
8019             </actions>
8020         </permacrud>
8021         </class>
8022
8023         <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">
8024                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8025                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8026                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8027                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8028                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8029                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8030                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8031                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8032                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8033                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8034                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8035                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8036                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8037                 </fields>
8038                 <links>
8039                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8040                 </links>
8041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8042             <actions>
8043                 <create permission="ADMIN_PROVIDER">
8044                     <context link="provider" field="owner"/>
8045                 </create>
8046                 <retrieve permission="ADMIN_PROVIDER">
8047                     <context link="provider" field="owner"/>
8048                 </retrieve>
8049                 <update permission="ADMIN_PROVIDER">
8050                     <context link="provider" field="owner"/>
8051                 </update>
8052                 <delete permission="ADMIN_PROVIDER">
8053                     <context link="provider" field="owner"/>
8054                 </delete>
8055             </actions>
8056         </permacrud>
8057         </class>
8058
8059         <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">
8060                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8061                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8062                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8063                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8064                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8065                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8066                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8067         </fields>
8068                 <links>
8069                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8070                 </links>
8071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8072             <actions>
8073                 <create permission="ADMIN_PROVIDER">
8074                     <context link="provider" field="owner"/>
8075                 </create>
8076                 <retrieve permission="ADMIN_PROVIDER">
8077                     <context link="provider" field="owner"/>
8078                 </retrieve>
8079                 <update permission="ADMIN_PROVIDER">
8080                     <context link="provider" field="owner"/>
8081                 </update>
8082                 <delete permission="ADMIN_PROVIDER">
8083                     <context link="provider" field="owner"/>
8084                 </delete>
8085             </actions>
8086         </permacrud>
8087     </class>
8088         <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">
8089                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8090                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8091                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8092                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8093                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8094                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8095                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8096                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8097                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8098                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8099                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8100                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8101                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8102                 </fields>
8103                 <links>
8104                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8105                 </links>
8106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8107             <actions>
8108                 <create permission="ADMIN_PROVIDER">
8109                     <context link="contact" jump='provider' field="owner"/>
8110                 </create>
8111                 <retrieve permission="ADMIN_PROVIDER">
8112                     <context link="contact" jump='provider' field="owner"/>
8113                 </retrieve>
8114                 <update permission="ADMIN_PROVIDER">
8115                     <context link="contact" jump='provider' field="owner"/>
8116                 </update>
8117                 <delete permission="ADMIN_PROVIDER">
8118                     <context link="contact" jump='provider' field="owner"/>
8119                 </delete>
8120             </actions>
8121         </permacrud>
8122         </class>
8123
8124         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8125                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8126                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8127                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8128                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8129                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8130                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8131                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8132                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8133                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8134                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8135                 </fields>
8136                 <links>
8137                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8138                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8139                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8140                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8141                 </links>
8142         </class>
8143
8144         <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">
8145                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8146                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8147                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8148                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8149                 </fields>
8150                 <links>
8151             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8152                 </links>
8153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8154                         <actions>
8155                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8156                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8157                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8158                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8159                         </actions>
8160                 </permacrud>
8161         </class>
8162
8163         <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">
8164                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8165                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8166                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8167                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8168                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8169                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8170                 </fields>
8171                 <links>
8172                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8173                 </links>
8174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8175                         <actions>
8176                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8177                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8178                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8179                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8180                         </actions>
8181                 </permacrud>
8182         </class>
8183
8184         <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">
8185                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8186                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8187                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8188                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8189                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8190                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8191                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8192                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8193                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8194                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8195                 </fields>
8196                 <links>
8197                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8198                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8199             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8200             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8201                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8202                 </links>
8203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8204             <actions>
8205                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8206                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8207                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8208                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8209             </actions>
8210         </permacrud>
8211         </class>
8212
8213         <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">
8214                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8215                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8216                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8217                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8218                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8219                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8220                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8221                 </fields>
8222                 <links>
8223                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8224                 </links>
8225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8226                         <actions>
8227                                 <create permission="ADMIN_FUNDING_SOURCE">
8228                     <context link="funding_source" field="owner"/>
8229                 </create>
8230                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8231                     <context link="funding_source" field="owner"/>
8232                 </retrieve>
8233                                 <update permission="ADMIN_FUNDING_SOURCE">
8234                     <context link="funding_source" field="owner"/>
8235                 </update>
8236                                 <delete permission="ADMIN_FUNDING_SOURCE">
8237                     <context link="funding_source" field="owner"/>
8238                 </delete>
8239                         </actions>
8240                 </permacrud>
8241         </class>
8242
8243         <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">
8244                 <fields oils_persist:primary="id">
8245                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8246                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8247                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8248                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8249                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8250                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8251                 </fields>
8252                 <links>
8253                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8254                 </links>
8255         </class>
8256
8257         <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">
8258                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8259                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8260                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8261                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8262                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8263                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8264                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8265                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8266                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8267                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8268                 </fields>
8269                 <links>
8270                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8271                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8272                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8273                 </links>
8274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8275                         <actions>
8276                                 <create permission="ADMIN_ACQ_FUND">
8277                     <context link="fund" field="org"/>
8278                 </create>
8279                                 <retrieve permission="ADMIN_ACQ_FUND">
8280                     <context link="fund" field="org"/>
8281                 </retrieve>
8282                                 <update permission="ADMIN_ACQ_FUND">
8283                     <context link="fund" field="org"/>
8284                 </update>
8285                                 <delete permission="ADMIN_ACQ_FUND">
8286                     <context link="fund" field="org"/>
8287                 </delete>
8288                         </actions>
8289                 </permacrud>
8290         </class>
8291
8292         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8293                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8294                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8295                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8296                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8297                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8298                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8299                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8300                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8301                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8302                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8303                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8304                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8305                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8306                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8307                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8308                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8309                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8310                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8311                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8312                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8313                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8314                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8315                 </fields>
8316                 <links>
8317                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8318                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8319             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8320             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8321             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8322             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8323             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8324             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8325             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8326             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8327             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8328                 </links>
8329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8330             <actions>
8331                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8332                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8333                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8334                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8335             </actions>
8336         </permacrud>
8337         </class>
8338
8339         <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">
8340                 <fields oils_persist:primary="fund">
8341                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8342                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8343                 </fields>
8344                 <links>
8345                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8346                 </links>
8347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8348             <actions>
8349                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8350                                         <context link="fund" field="org" />
8351                 </retrieve>
8352             </actions>
8353         </permacrud>
8354         </class>
8355
8356         <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">
8357                 <fields oils_persist:primary="fund">
8358                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8359                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8360                 </fields>
8361                 <links>
8362                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8363                 </links>
8364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8365             <actions>
8366                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8367                                         <context link="fund" field="org" />
8368                 </retrieve>
8369             </actions>
8370         </permacrud>
8371         </class>
8372
8373         <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">
8374                 <fields oils_persist:primary="fund">
8375                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8376                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8377                 </fields>
8378                 <links>
8379                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8380                 </links>
8381         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8382             <actions>
8383                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8384                                         <context link="fund" field="org" />
8385                 </retrieve>
8386             </actions>
8387         </permacrud>
8388         </class>
8389
8390         <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">
8391                 <fields oils_persist:primary="fund">
8392                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8393                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8394                 </fields>
8395                 <links>
8396                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8397                 </links>
8398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8399             <actions>
8400                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8401                                         <context link="fund" field="org" />
8402                 </retrieve>
8403             </actions>
8404         </permacrud>
8405         </class>
8406
8407         <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">
8408                 <fields oils_persist:primary="fund">
8409                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8410                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8411                 </fields>
8412                 <links>
8413                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8414                 </links>
8415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8416             <actions>
8417                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8418                                         <context link="fund" field="org" />
8419                 </retrieve>
8420             </actions>
8421         </permacrud>
8422         </class>
8423
8424    <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">
8425         <fields oils_persist:primary="fund">
8426             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8427             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8428         </fields>
8429         <links>
8430             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8431         </links>
8432     </class>
8433
8434    <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">
8435         <fields oils_persist:primary="fund">
8436             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8437             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8438         </fields>
8439         <links>
8440             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8441         </links>
8442     </class>
8443
8444    <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">
8445         <fields oils_persist:primary="fund">
8446             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8447             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8448         </fields>
8449         <links>
8450             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8451         </links>
8452     </class>
8453
8454    <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">
8455         <fields oils_persist:primary="fund">
8456             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8457             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8458         </fields>
8459         <links>
8460             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8461         </links>
8462     </class>
8463
8464    <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">
8465         <fields oils_persist:primary="fund">
8466             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8467             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8468         </fields>
8469         <links>
8470             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8471         </links>
8472     </class>
8473
8474         <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">
8475                 <fields oils_persist:primary="funding_source">
8476                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8477                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8478                 </fields>
8479                 <links>
8480                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8481                 </links>
8482         </class>
8483
8484         <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">
8485                 <fields oils_persist:primary="funding_source">
8486                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8487                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8488                 </fields>
8489                 <links>
8490                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8491                 </links>
8492         </class>
8493
8494         <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">
8495                 <fields oils_persist:primary="funding_source">
8496                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8497                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8498                 </fields>
8499                 <links>
8500                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8501                 </links>
8502         </class>
8503
8504         <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">
8505                 <fields oils_persist:primary="fund">
8506                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8507                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8508                 </fields>
8509                 <links>
8510                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8511                 </links>
8512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8513             <actions>
8514                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8515                                         <context link="fund" field="org" />
8516                 </retrieve>
8517             </actions>
8518         </permacrud>
8519     </class>
8520     <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">
8521         <oils_persist:source_definition><![CDATA[
8522             SELECT
8523                 acqf.*,
8524                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8525                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8526                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8527                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8528             FROM
8529                 acq.fund acqf
8530                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8531                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8532                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8533                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8534         ]]></oils_persist:source_definition>
8535         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8536             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8537             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8538             <field reporter:label="Name" name="name" reporter:datatype="text" />
8539             <field reporter:label="Year" name="year" reporter:datatype="int" />
8540             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8541             <field reporter:label="Code" name="code" reporter:datatype="text" />
8542             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8543             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8544             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8545             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8546             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8547
8548             <!-- non fund-native fields -->
8549             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8550             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8551             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8552             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8553         </fields>
8554         <links>
8555             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8556             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8557             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8558         </links>
8559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8560             <actions>
8561                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8562             </actions>
8563         </permacrud>
8564         </class>
8565         <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">
8566                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8567                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8568                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8569                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8570                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8571                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8572                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8573                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8574                 </fields>
8575                 <links>
8576                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8577                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8578                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8579                 </links>
8580                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8581                         <actions>
8582                                 <create permission="ADMIN_ACQ_FUND">
8583                     <context link="fund" field="org"/>
8584                 </create>
8585                                 <retrieve permission="ADMIN_ACQ_FUND">
8586                     <context link="fund" field="org"/>
8587                 </retrieve>
8588                                 <update permission="ADMIN_ACQ_FUND">
8589                     <context link="fund" field="org"/>
8590                 </update>
8591                                 <delete permission="ADMIN_ACQ_FUND">
8592                     <context link="fund" field="org"/>
8593                 </delete>
8594                         </actions>
8595                 </permacrud>
8596         </class>
8597
8598     <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">
8599         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8600             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8601             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8602             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8603             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8604             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8605             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8606             <field reporter:label="Note" name="note" reporter:datatype="text" />
8607             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8608         </fields>
8609         <links>
8610             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8611             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8612             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8613         </links>
8614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8615                         <actions>
8616                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8617                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8618                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8619                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8620                         </actions>
8621                 </permacrud>
8622     </class>
8623
8624         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8625                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8626                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8627                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8628                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8630                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8631                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8632                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8633                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8634                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8635                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8636                 </fields>
8637                 <links>
8638                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8639                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8640                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8641                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8642                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8643                 </links>
8644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8645                         <actions>
8646                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8647                         </actions>
8648                 </permacrud>
8649         </class>
8650
8651         <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">
8652                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8653                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8654                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8655                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8656                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8657                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8658                 </fields>
8659                 <links>
8660                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8661                 </links>
8662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8663                         <actions>
8664                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8665                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8666                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8667                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8668                         </actions>
8669                 </permacrud>
8670         </class>
8671
8672         <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">
8673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8674                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8675                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8676                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8677                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8678                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8679                         <field reporter:label="State" name="state" reporter:datatype="text" />
8680                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8681                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8682                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8683                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8684                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8685                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8686                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8687                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8688                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8689                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8690                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8691                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8692                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8693                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8694                 </fields>
8695                 <links>
8696                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8697                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8698                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8699                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8700                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8701                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8702                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8703                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8704                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8705                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8706                 </links>
8707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8708                         <actions>
8709                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8710                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8711                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8712                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8713                         </actions>
8714                 </permacrud>
8715         </class>
8716
8717         <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">
8718                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8719                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8720                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8721                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8722                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8723                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8724                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8725                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8726                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8727                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8728                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8729                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8730                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8731                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8732                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8733                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8734                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8735                 </fields>
8736                 <links>
8737                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8738                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8739                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8740                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8741                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8742                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8743                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8744                 </links>
8745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8746             <actions>
8747                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8748             </actions>
8749                 </permacrud>
8750         </class>
8751
8752         <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">
8753                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8754                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8755                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8756                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8757                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8758                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8759                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8760                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8761                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8762                 </fields>
8763                 <links>
8764                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8765                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8766                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8767                 </links>
8768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8769             <actions>
8770                 <create permission="CREATE_PURCHASE_ORDER">
8771                     <context link="purchase_order" field="ordering_agency"/>
8772                 </create>
8773                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8774                     <context link="purchase_order" field="ordering_agency"/>
8775                 </retrieve>
8776                 <update permission="CREATE_PURCHASE_ORDER">
8777                     <context link="purchase_order" field="ordering_agency"/>
8778                 </update>
8779                 <delete permission="CREATE_PURCHASE_ORDER">
8780                     <context link="purchase_order" field="ordering_agency"/>
8781                 </delete>
8782             </actions>
8783                 </permacrud>
8784         </class>
8785
8786         <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">
8787                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8788                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8789                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8790                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8791                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8792                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8793                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8794                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8795                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8796                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8797                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8798                 </fields>
8799                 <links>
8800                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8801                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8802                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8803                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8804                 </links>
8805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8806             <actions>
8807                 <create permission="CREATE_PURCHASE_ORDER">
8808                     <context link="purchase_order" field="ordering_agency"/>
8809                 </create>
8810                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8811                     <context link="purchase_order" field="ordering_agency"/>
8812                 </retrieve>
8813                 <update permission="CREATE_PURCHASE_ORDER">
8814                     <context link="purchase_order" field="ordering_agency"/>
8815                 </update>
8816                 <delete permission="CREATE_PURCHASE_ORDER">
8817                     <context link="purchase_order" field="ordering_agency"/>
8818                 </delete>
8819             </actions>
8820                 </permacrud>
8821         </class>
8822
8823         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8824                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8825                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8826                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8827                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8828                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8829                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8830                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8831                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8832                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8833                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8834                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8835                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8836                         <field reporter:label="State" name="state" reporter:datatype="text" />
8837                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8838                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8839                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8840                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8841                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8842                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8843                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8844                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8845                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8846                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8847                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8848                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8849                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8850                 </fields>
8851                 <links>
8852                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8853                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8854                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8855                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8856                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8857                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8858                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8859                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8860                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8861                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8862                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8863                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8864                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8865                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8866                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8867                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8868                 </links>
8869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8870                         <actions>
8871                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8872                                         <context link="purchase_order" field="ordering_agency"/>
8873                                         <context link="picklist" field="org_unit"/>
8874                                 </retrieve>
8875                         </actions>
8876                 </permacrud>
8877         </class>
8878
8879         <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">
8880                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8881                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8882                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8883                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8884                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8885                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8886                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8887                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8888                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8889                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8890                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8891                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8892                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8893                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8894                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8895                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8896                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8897                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8898                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8899                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8900                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8901                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8902                 </fields>
8903                 <links>
8904                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8905                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8906                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8907                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8908                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8909                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8910                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8911                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8912                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8913                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8914                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8915                 </links>
8916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8917                         <actions>
8918                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8919                                         <context link="purchase_order" field="ordering_agency"/>
8920                                         <context link="picklist" field="org_unit"/>
8921                                 </retrieve>
8922                         </actions>
8923                 </permacrud>
8924         </class>
8925
8926         <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">
8927                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8928                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8929                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8930                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8931                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8932                 </fields>
8933                 <links>
8934                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8935                 </links>
8936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8937                         <actions>
8938                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8939                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8940                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8941                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8942                         </actions>
8943                 </permacrud>
8944         </class>
8945
8946         <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">
8947                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8948                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8949                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8950                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8951                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8952                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8953                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8954                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8955                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8956                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8957                 </fields>
8958                 <links>
8959                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8960                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8961                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8962                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8963                 </links>
8964         </class>
8965
8966         <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">
8967                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8968                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8969                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8970                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8971                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8972                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8973                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8974                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8975                 </fields>
8976                 <links>
8977                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8978                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8979                 </links>
8980         </class>
8981
8982         <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">
8983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8984                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8985                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8986                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8987                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8988                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8989                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8990                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8991                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8992                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8993                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8994                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8995                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8996                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8997                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8998                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8999                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9000                 </fields>
9001                 <links>
9002                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9003                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9004                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9005                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9006                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9007                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9008                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9009                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9010                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9011                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9012                 </links>
9013         </class>
9014
9015         <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">
9016                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9017                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9018                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9019                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9020                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9021                 </fields>
9022                 <links/>
9023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9024                         <actions>
9025                                 <retrieve />
9026                         </actions>
9027                 </permacrud>
9028         </class>
9029
9030         <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">
9031                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9032                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9033                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9034                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9035                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9036                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9037             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9038                 </fields>
9039                 <links/>
9040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9041             <actions>
9042                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9043                 <retrieve />
9044                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9045                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9046             </actions>
9047         </permacrud>
9048         </class>
9049
9050         <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">
9051                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9052                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9053                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9054                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9055                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9056                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9057                 </fields>
9058                 <links/>
9059         </class>
9060         <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">
9061                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9062                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9063                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9064                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9065                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9066                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9067                 </fields>
9068                 <links>
9069                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9070                 </links>
9071         </class>
9072
9073         <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">
9074             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9075                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9076                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9077                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9078                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9079                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9080                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9081         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9082
9083             </fields>
9084             <links>
9085                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9086             </links>
9087             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9088                 <actions>
9089                     <create permission="ADMIN_PROVIDER">
9090                         <context link="provider" field="owner"/>
9091                     </create>
9092                     <retrieve permission="ADMIN_PROVIDER">
9093                         <context link="provider" field="owner"/>
9094                     </retrieve>
9095                     <update permission="ADMIN_PROVIDER">
9096                         <context link="provider" field="owner"/>
9097                     </update>
9098                     <delete permission="ADMIN_PROVIDER">
9099                         <context link="provider" field="owner"/>
9100                     </delete>
9101                 </actions>
9102             </permacrud>
9103         </class>
9104         
9105         <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">
9106             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9107                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9108                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9109                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9110                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9111             </fields>
9112             <links>
9113                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9114             </links>
9115             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9116                 <actions>
9117                     <create permission="ADMIN_PROVIDER">
9118                         <context link="provider" field="owner"/>
9119                     </create>
9120                     <retrieve permission="ADMIN_PROVIDER">
9121                         <context link="provider" field="owner"/>
9122                     </retrieve>
9123                     <update permission="ADMIN_PROVIDER">
9124                         <context link="provider" field="owner"/>
9125                     </update>
9126                     <delete permission="ADMIN_PROVIDER">
9127                         <context link="provider" field="owner"/>
9128                     </delete>
9129                 </actions>
9130             </permacrud>
9131         </class>
9132         
9133         <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">
9134             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9135                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9136                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9137                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9138                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9139                 </fields>
9140                 <links/>
9141         </class>
9142
9143         <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">
9144                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9145                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9146                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9147                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9148                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9149                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9150                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9151                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9152                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9153                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9154                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9155                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9156                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9157                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9158                 </fields>
9159                 <links>
9160                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9161                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9162                 </links>
9163         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9164             <actions>
9165                 <create permission="ADMIN_PROVIDER">
9166                     <context link="provider" field="owner"/>
9167                 </create>
9168                 <retrieve permission="ADMIN_PROVIDER">
9169                     <context link="provider" field="owner"/>
9170                 </retrieve>
9171                 <update permission="ADMIN_PROVIDER">
9172                     <context link="provider" field="owner"/>
9173                 </update>
9174                 <delete permission="ADMIN_PROVIDER">
9175                     <context link="provider" field="owner"/>
9176                 </delete>
9177             </actions>
9178         </permacrud>
9179         </class>
9180
9181         <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">
9182                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9183                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9184                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9185                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9186                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9187                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9188                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9189                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9190                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9191                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9192                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9193                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9194                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9195                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9196                 </fields>
9197                 <links>
9198                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9199                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9200                 </links>
9201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9202             <actions>
9203                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9204                     <context link="account" jump="provider" field="owner"/>
9205                 </retrieve>
9206                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9207                     <context link="account" jump="provider" field="owner"/>
9208                 </update>
9209                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9210                     <context link="account" jump="provider" field="owner"/>
9211                 </delete>
9212             </actions>
9213         </permacrud>
9214         </class>
9215
9216
9217         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9218                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9219                         <field name="id" reporter:datatype="id" />
9220                         <field name="parent" reporter:datatype="link"/>
9221                         <field name="owner" reporter:datatype="link"/>
9222                         <field name="create_time" reporter:datatype="timestamp"/>
9223                         <field name="name" reporter:datatype="text"/>
9224                         <field name="shared" reporter:datatype="bool"/>
9225                         <field name="share_with" reporter:datatype="link"/>
9226                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9227                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9228                 </fields>
9229                 <links>
9230                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9231                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9232                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9233                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9234                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9235                 </links>
9236         </class>
9237         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9238                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9239                         <field name="id" reporter:datatype="id" />
9240                         <field name="parent" reporter:datatype="link"/>
9241                         <field name="owner" reporter:datatype="link"/>
9242                         <field name="create_time" reporter:datatype="timestamp"/>
9243                         <field name="name" reporter:datatype="text"/>
9244                         <field name="shared" reporter:datatype="bool"/>
9245                         <field name="share_with" reporter:datatype="link"/>
9246                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9247                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9248                 </fields>
9249                 <links>
9250                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9251                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9252                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9253                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9254                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9255                 </links>
9256         </class>
9257         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9258                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9259                         <field name="id" reporter:datatype="id" />
9260                         <field name="parent" reporter:datatype="link"/>
9261                         <field name="owner" reporter:datatype="link"/>
9262                         <field name="create_time" reporter:datatype="timestamp"/>
9263                         <field name="name" reporter:datatype="text"/>
9264                         <field name="shared" reporter:datatype="bool"/>
9265                         <field name="share_with" reporter:datatype="link"/>
9266                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9267                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9268                 </fields>
9269                 <links>
9270                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9271                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9272                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9273                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9274                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9275                 </links>
9276         </class>
9277         <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">
9278                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9279                         <field name="id" reporter:datatype="id" />
9280                         <field name="owner" reporter:datatype="link"/>
9281                         <field name="create_time" reporter:datatype="timestamp"/>
9282                         <field name="name" reporter:datatype="text"/>
9283                         <field name="data" reporter:datatype="text"/>
9284                         <field name="folder" reporter:datatype="link"/>
9285                         <field name="description" reporter:datatype="text"/>
9286                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9287                 </fields>
9288                 <links>
9289                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9290                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9291                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9292                 </links>
9293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9294             <actions>
9295                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9296                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9297                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9298                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9299             </actions>
9300         </permacrud>
9301         </class>
9302         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9303                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9304                         <field name="id" reporter:datatype="id" />
9305                         <field name="owner" reporter:datatype="link"/>
9306                         <field name="create_time" reporter:datatype="timestamp"/>
9307                         <field name="template" reporter:datatype="link"/>
9308                         <field name="data" reporter:datatype="text"/>
9309                         <field name="folder" reporter:datatype="link"/>
9310                         <field name="recur" reporter:datatype="bool"/>
9311                         <field name="recurrence" reporter:datatype="interval"/>
9312                         <field name="name" reporter:datatype="text"/>
9313                         <field name="description" reporter:datatype="text"/>
9314                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9315                 </fields>
9316                 <links>
9317                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9318                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9319                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9320                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9321                 </links>
9322         </class>
9323         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9324                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9325                         <field name="id" reporter:datatype="id" />
9326                         <field name="runner" reporter:datatype="link"/>
9327                         <field name="start_time" reporter:datatype="timestamp"/>
9328                         <field name="complete_time" reporter:datatype="timestamp"/>
9329                         <field name="run_time" reporter:datatype="timestamp"/>
9330                         <field name="email" reporter:datatype="text"/>
9331                         <field name="excel_format" reporter:datatype="bool"/>
9332                         <field name="csv_format" reporter:datatype="bool"/>
9333                         <field name="html_format" reporter:datatype="bool"/>
9334                         <field name="error_code" reporter:datatype="int"/>
9335                         <field name="error_text" reporter:datatype="text"/>
9336                         <field name="report" reporter:datatype="link"/>
9337                         <field name="folder" reporter:datatype="link"/>
9338                         <field name="chart_pie" reporter:datatype="bool"/>
9339                         <field name="chart_bar" reporter:datatype="bool"/>
9340                         <field name="chart_line" reporter:datatype="bool"/>
9341                 </fields>
9342                 <links>
9343                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9344                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9345                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9346                 </links>
9347         </class>
9348         <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">
9349                 <fields oils_persist:primary="id">
9350                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9351                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9352                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9353                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9354                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9355                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9356                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9357                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9358                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9359                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9360                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9361                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9362                 </fields>
9363                 <links>
9364                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9365                 </links>
9366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9367                         <actions>
9368                                 <retrieve />
9369                         </actions>
9370                 </permacrud>
9371         </class>
9372         <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">
9373                 <fields oils_persist:primary="id">
9374                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9375                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9376                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9377                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9378                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9379                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9380                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9381                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9382                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9383                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9384                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9385                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9386                 </fields>
9387                 <links>
9388                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9389                 </links>
9390         </class>
9391         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9392                 <fields oils_persist:primary="id">
9393                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9394                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9395                         <field reporter:label="Fingerprint" name="fingerprint" />
9396                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9397                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9398                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9399                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9400                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9401                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9402                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9403                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9404                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9405                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9406                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9407                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9408                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9409                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9410                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9411                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9412                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9413                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9414                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9415                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9416                 </fields>
9417                 <links>
9418                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9419                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9420                 </links>
9421         </class>
9422         <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">
9423                 <fields oils_persist:primary="id">
9424                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9425                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9426                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9427                 </fields>
9428                 <links>
9429                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9430                 </links>
9431         </class>
9432         <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">
9433                 <fields oils_persist:primary="id">
9434                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9435                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9436                 </fields>
9437                 <links>
9438                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9439                 </links>
9440         </class>
9441         <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">
9442                 <fields oils_persist:primary="id">
9443                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9444                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9445                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9446                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9447                 </fields>
9448                 <links>
9449                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9450                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9451                 </links>
9452         </class>
9453         <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">
9454                 <fields oils_persist:primary="xact">
9455                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9456                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9457                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9458                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9459                 </fields>
9460                 <links>
9461                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9462                 </links>
9463         </class>
9464         <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">
9465                 <fields oils_persist:primary="xact">
9466                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9467                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9468                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9469                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9470                 </fields>
9471                 <links>
9472                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9473                 </links>
9474         </class>
9475         <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)">
9476                 <fields oils_persist:primary="id">
9477                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9478                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9479                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9480                 </fields>
9481                 <links>
9482                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9483                 </links>
9484         </class>
9485         <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">
9486                 <fields oils_persist:primary="id">
9487                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9488                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9489                 </fields>
9490                 <links>
9491                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9492                 </links>
9493         </class>
9494         <class id="erccpo" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::copy_count_per_org" oils_persist:tablename="extend_reporter.copy_count_per_org" reporter:label="Library Holdings Count with Deleted">
9495                 <fields oils_persist:primary="bibid">
9496                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
9497                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
9498                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
9499                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
9500                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
9501                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
9502                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
9503                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
9504                 </fields>
9505                 <links>
9506                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
9507                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9508                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9509                 </links>
9510         </class>
9511         <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">
9512                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9513                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9514                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9515                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9516                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9517                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9518                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9519                 </fields>
9520                 <links>
9521                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9522                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9523                 </links>
9524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9525                         <actions>
9526                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9527                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9528                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9529                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9530                         </actions>
9531                 </permacrud>
9532         </class>
9533         <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">
9534                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9535                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9536                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9537                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9538                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9539                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9540                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9541                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9542                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9543                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9544                 </fields>
9545                 <links>
9546                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9547                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9548                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9549                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9550                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9551                 </links>
9552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9553                         <actions>
9554                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9555                                         <context link="formula" field="owner"/>
9556                                 </create>
9557                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9558                                         <context link="formula" field="owner"/>
9559                                 </retrieve>
9560                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9561                                         <context link="formula" field="owner"/>
9562                                 </update>
9563                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9564                                         <context link="formula" field="owner"/>
9565                                 </delete>
9566                         </actions>
9567                 </permacrud>
9568         </class>
9569
9570         <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">
9571                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9572                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9573                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9574                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9575                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9576                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9577                 </fields>
9578                 <links>
9579                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9580                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9581                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9582                 </links>
9583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9584                         <actions>
9585                                 <create permission="CREATE_PURCHASE_ORDER">
9586                                         <context link="formula" field="owner"/>
9587                 </create>
9588                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9589                                         <context link="formula" field="owner"/>
9590                 </retrieve>
9591                                 <update permission="CREATE_PURCHASE_ORDER">
9592                                         <context link="formula" field="owner"/>
9593                 </update>
9594                                 <delete permission="CREATE_PURCHASE_ORDER">
9595                                         <context link="formula" field="owner"/>
9596                 </delete>
9597                         </actions>
9598                 </permacrud>
9599         </class>
9600
9601         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9602                 <fields oils_persist:primary="id">
9603                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9604                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9605                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9606                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9607                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9608                 </fields>
9609                 <links>
9610                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9611                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9612                 </links>
9613         </class>
9614
9615         <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">
9616                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9617                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9618                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9619                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9620                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9621                 </fields>
9622                 <links>
9623                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9624                 </links>
9625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9626                         <actions>
9627                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9628                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9629                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9630                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9631                         </actions>
9632                 </permacrud>
9633         </class>
9634
9635         <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">
9636                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9637                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9638                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9639                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9640                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9641                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9642                 </fields>
9643                 <links>
9644                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9645                 </links>
9646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9647                         <actions>
9648                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9649                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9650                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9651                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9652                         </actions>
9653                 </permacrud>
9654         </class>
9655
9656         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9657                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9658                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9659                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9660                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9661                 </fields>
9662                 <links>
9663                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9664                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9665                 </links>
9666         </class>
9667
9668         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9670                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9671                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9672                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9673                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9674                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9675                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9676                 </fields>
9677                 <links>
9678                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9679                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9680                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9681                 </links>
9682         </class>
9683
9684         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9685                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9686                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9687                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9688                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9689                 </fields>
9690                 <links>
9691                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9692                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9693                 </links>
9694         </class>
9695
9696         <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">
9697                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9698                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9699                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9700                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9701                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9702                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9703                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9704                 </fields>
9705                 <links>
9706                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9707                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9708                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9709                 </links>
9710         </class>
9711
9712         <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">
9713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9714                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9715                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9716                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9717                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9718                 </fields>
9719                 <links>
9720                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9721                 </links>
9722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9723             <actions>
9724                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9725                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9726                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9727                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9728             </actions>
9729                 </permacrud>
9730         </class>
9731
9732         <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">
9733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9734                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9735                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9736                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9737                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9738                 </fields>
9739                 <links>
9740                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9741                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9742                 </links>
9743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9744                         <actions>
9745                                 <create permission="ADMIN_CLAIM_POLICY">
9746                                         <context link="claim_policy" field="org_unit"/>
9747                 </create>
9748                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9749                                         <context link="claim_policy" field="org_unit"/>
9750                 </retrieve>
9751                                 <update permission="ADMIN_CLAIM_POLICY">
9752                                         <context link="claim_policy" field="org_unit"/>
9753                 </update>
9754                                 <delete permission="ADMIN_CLAIM_POLICY">
9755                                         <context link="claim_policy" field="org_unit"/>
9756                 </delete>
9757                         </actions>
9758                 </permacrud>
9759         </class>
9760
9761     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9762         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9763             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9764             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9765             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9766             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9767             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9768             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9769             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9770             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9771             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9772             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9773             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9774             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9775             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9776             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9777             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9778             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9779         </fields>
9780         <links>
9781             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9782         </links>
9783     </class>
9784
9785     <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">
9786         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9787             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9788             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9789             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9790             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9791             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9792         </fields>
9793     </class>
9794
9795     <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">
9796         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9797             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9798             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9799             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9800             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9801             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9802             <field reporter:label="City" name="city" reporter:datatype="text"/>
9803             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9804             <field reporter:label="State" name="state" reporter:datatype="text"/>
9805             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9806             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9807             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9808         </fields>
9809     </class>
9810
9811     <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">
9812         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9813             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9814             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9815             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9816             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9817             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9818             <field reporter:label="City" name="city" reporter:datatype="text"/>
9819             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9820             <field reporter:label="State" name="state" reporter:datatype="text"/>
9821             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9822             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9823             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9824         </fields>
9825     </class>
9826
9827     <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">
9828         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9829             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9830             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9831             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9832             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9833             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9834             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9835         </fields>
9836     </class>
9837
9838     <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">
9839         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9840             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9841             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9842             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9843             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9844             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9845             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9846         </fields>
9847     </class>
9848
9849         <class id="afsg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_group" oils_persist:tablename="action.fieldset_group" reporter:label="Fieldset Group">
9850                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
9851                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
9852                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9853                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
9854                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
9855                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
9856                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
9857                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
9858                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
9859                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9860                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9861                 </fields>
9862                 <links>
9863                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9864                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9865                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
9866                 </links>
9867                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9868                         <actions>
9869                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
9870                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
9871                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
9872                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
9873                         </actions>
9874                 </permacrud>
9875         </class>
9876
9877         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9878                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9879                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9880                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9881                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9882                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9883                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9884                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9885                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9886                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9887                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9888                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9889                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9890                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
9891                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
9892                 </fields>
9893                 <links>
9894                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9895                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9896                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9897                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
9898                 </links>
9899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9900                         <actions>
9901                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
9902                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
9903                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
9904                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
9905                         </actions>
9906                 </permacrud>
9907         </class>
9908
9909         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9910                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9911                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9912                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9913                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9914                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9915                 </fields>
9916                 <links>
9917                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9918                 </links>
9919                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
9920                         <actions>
9921                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
9922                     <context link="fieldset" field="owning_lib"/>
9923                 </create>
9924                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
9925                     <context link="fieldset" field="owning_lib"/>
9926                 </retrieve>
9927                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
9928                     <context link="fieldset" field="owning_lib"/>
9929                 </update>
9930                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
9931                     <context link="fieldset" field="owning_lib"/>
9932                 </delete>
9933                         </actions>
9934                 </permacrud>
9935         </class>
9936
9937     <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">
9938         <fields>
9939             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9940             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9941             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9942         </fields>
9943                 <links>
9944                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9945                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9946                 </links>
9947     </class>
9948
9949     <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">
9950         <fields>
9951             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9952             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9953         </fields>
9954                 <links>
9955                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9956                 </links>
9957     </class>
9958
9959     <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">
9960         <fields>
9961             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9962             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9963             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9964         </fields>
9965                 <links>
9966                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9967                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9968                 </links>
9969     </class>
9970
9971     <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">
9972         <fields>
9973             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9974             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9975         </fields>
9976                 <links>
9977                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9978                 </links>
9979     </class>
9980
9981     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9982                 <oils_persist:source_definition>
9983
9984             SELECT  DISTINCT l.*
9985               FROM  action.unfulfilled_hold_loops l
9986                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9987               WHERE l.count = m.max
9988
9989                 </oils_persist:source_definition>
9990         <fields>
9991             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9992             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9993             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9994         </fields>
9995                 <links>
9996                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9997                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9998                 </links>
9999     </class>
10000
10001         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10002                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10003                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10004                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10005                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10006                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10007                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10008                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10009                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10010                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10011                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10012                 </fields>
10013                 <links>
10014                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10015                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10016                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10017                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10018                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10019                 </links>
10020         </class>
10021
10022         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10023                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10024                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10025                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10026                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10027                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10028                 </fields>
10029                 <links>
10030                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10031                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10032                 </links>
10033         </class>
10034
10035         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10036                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10037                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10038                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10039                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10040                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10041                 </fields>
10042                 <links>
10043                 </links>
10044         </class>
10045
10046         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10047                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10048                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10049                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10050                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10051                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10052                 </fields>
10053                 <links>
10054                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10055                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10056                 </links>
10057         </class>
10058         
10059         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10060                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10061                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10062                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10063                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10064                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10065                 </fields>
10066                 <links>
10067                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10068                 </links>
10069         </class>
10070         
10071         <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">
10072                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10073                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10074                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10075                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10076                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10077                 </fields>
10078                 <links>
10079                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10080                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10081                 </links>
10082         </class>
10083
10084         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10085                 <fields oils_persist:primary="name">
10086                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10087                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10088                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10089                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10090                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10091                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10092                 </fields>
10093                 <links>
10094                 </links>
10095         </class>
10096
10097         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10098                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10099                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10100                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10101                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10102                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10103                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10104                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10105                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10106                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10107                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10108                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10109                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10110                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10111                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10112                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10113                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10114                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10115                 </fields>
10116                 <links>
10117                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10118                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10119                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10120                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10121                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10122                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10123                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10124                 </links>
10125         </class>
10126
10127         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10128                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10129                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10130                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10131                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10132                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10133                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10134                 </fields>
10135                 <links>
10136                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10137                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10138                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10139                 </links>
10140         </class>
10141
10142         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10143                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10144                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10145                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10146                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10147                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10148                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10149                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10150                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10151                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10152                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10153                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10154                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10155                 </fields>
10156                 <links>
10157                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10158                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10159                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10160                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10161                 </links>
10162         </class>
10163
10164         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10165                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10166                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10167                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10168                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10169                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10170                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10171                 </fields>
10172                 <links>
10173                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10174                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10175                 </links>
10176         </class>
10177
10178         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10179                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10180                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10181                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10182                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10183                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10184                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10185                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10186                 </fields>
10187                 <links>
10188                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10189                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10190                 </links>
10191         </class>
10192
10193         <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">
10194                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10195                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10196                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10197                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10198                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10199                 </fields>
10200                 <links>
10201                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10202                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10203                 </links>
10204         </class>
10205
10206         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10207                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10208                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10209                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10210                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10211                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10212                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10213                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10214                 </fields>
10215                 <links>
10216                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10217                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10218                 </links>
10219         </class>
10220
10221         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10222                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10223                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10224                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10225                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10226                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10227                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10228                 </fields>
10229                 <links>
10230                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10231                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10232                 </links>
10233         </class>
10234
10235         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10236                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10237                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10238                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10239                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10240                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10241                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10242                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10243                 </fields>
10244                 <links>
10245                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10246                 </links>
10247         </class>
10248
10249         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10250                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10251                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10252                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10253                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10254                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10255                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10256                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10257                 </fields>
10258                 <links>
10259                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10260                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10261                 </links>
10262         </class>
10263
10264         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10265                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10266                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10267                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10268                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10269                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10270                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10271                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10272                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10273                 </fields>
10274                 <links>
10275                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10276                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10277                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10278                 </links>
10279         </class>
10280
10281         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10282                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10283                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10284                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10285                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10286                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10287                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10288                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10289                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10290                 </fields>
10291                 <links>
10292                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10293                 </links>
10294         </class>
10295
10296         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10297                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10298                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10299                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10300                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10301                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10302                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10303                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10304                 </fields>
10305                 <links>
10306                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10307                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10308                 </links>
10309         </class>
10310
10311         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10312                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10313                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10314                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10315                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10316                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10317                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10318                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10319                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10320                 </fields>
10321                 <links>
10322                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10323                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10324                 </links>
10325         </class>
10326
10327         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10328                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10329                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10330                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10331                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10332                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10333                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10334                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10335                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10336                 </fields>
10337                 <links>
10338                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10339                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10340                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10341                 </links>
10342         </class>
10343
10344         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10345                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10346                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10347                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10348                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10349                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10350                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10351                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10352                 </fields>
10353                 <links>
10354                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10355                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10356                 </links>
10357         </class>
10358
10359         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10360                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10361                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10362                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10363                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10364                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10365                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10366                 </fields>
10367                 <links>
10368                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10369                 </links>
10370         </class>
10371
10372         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10373                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10374                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10375                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10376                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10377                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10378                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10379                 </fields>
10380                 <links>
10381                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10382                 </links>
10383         </class>
10384
10385         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10386                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10387                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10388                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10389                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10390                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10391                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10392                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10393                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10394                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10395                 </fields>
10396                 <links>
10397                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10398                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10399                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10400                 </links>
10401         </class>
10402
10403         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10404                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10405                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10406                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10407                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10408                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10409                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10410                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10411                 </fields>
10412                 <links>
10413                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10414                 </links>
10415         </class>
10416
10417         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10418                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10419                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10420                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10421                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10422                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10423                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10424                 </fields>
10425                 <links>
10426                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10427                 </links>
10428         </class>
10429
10430         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10431                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10432                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10433                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10434                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10435                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10436                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10437                 </fields>
10438                 <links>
10439                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10440                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10441                 </links>
10442         </class>
10443
10444         <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">
10445                 <fields oils_persist:primary="id">
10446                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10447                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10448                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10449                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10450                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10451                 </fields>
10452                 <links>
10453                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10454                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10455                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10456                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10457                 </links>
10458         </class>
10459
10460         <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">
10461                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10462                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10463                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10464                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10465                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10466                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10467                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10468                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10469                 </fields>
10470                 <links/>
10471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10472                         <actions>
10473                                 <retrieve/>
10474                         </actions>
10475                 </permacrud>
10476         </class>
10477
10478         <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">
10479                 <fields oils_persist:primary="ptype_key">
10480                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10481                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10482                 </fields>
10483                 <links/>
10484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10485                         <actions>
10486                                 <retrieve/>
10487                         </actions>
10488                 </permacrud>
10489         </class>
10490
10491         <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">
10492                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10493                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10494                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10495                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10496                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10497                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10498                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10499                 </fields>
10500                 <links>
10501                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10502                 </links>
10503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10504                         <actions>
10505                                 <retrieve/>
10506                         </actions>
10507                 </permacrud>
10508         </class>
10509
10510         <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">
10511                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10512                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10513                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10514                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10515                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10516                 </fields>
10517                 <links>
10518                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10519                 </links>
10520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10521                         <actions>
10522                                 <retrieve/>
10523                         </actions>
10524                 </permacrud>
10525         </class>
10526
10527     <class
10528         id="uvs"
10529         controller="open-ils.cstore open-ils.pcrud"
10530         oils_obj:fieldmapper="url_verify::session"
10531         oils_persist:tablename="url_verify.session"
10532         reporter:label="URL Verification Session"
10533     >
10534         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10535             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10536             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10537                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10538             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10539             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10540             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10541             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10542             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10543             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10544         </fields>
10545
10546         <links>
10547             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10548             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10549             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10550             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10551             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10552         </links>
10553
10554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10555             <actions>
10556                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10557             </actions>
10558         </permacrud>
10559
10560     </class>
10561
10562     <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">
10563         <oils_persist:source_definition>
10564             SELECT
10565                 cbrebi.id AS id,  -- so we can have a pkey in our view
10566                 uvs.id AS session,
10567                 uvs.owning_lib,
10568                 cbrebi.target_biblio_record_entry
10569             FROM url_verify.session uvs
10570             JOIN container.biblio_record_entry_bucket cbreb
10571                 ON (uvs.container = cbreb.id)
10572             JOIN container.biblio_record_entry_bucket_item cbrebi
10573                 ON (cbrebi.bucket = cbreb.id)
10574         </oils_persist:source_definition>
10575         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10576             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10577             <field reporter:label="Session" name="session" reporter:datatype="link" />
10578             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10579             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10580         </fields>
10581         <links>
10582             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10583             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10584             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10585         </links>
10586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10587             <actions>
10588                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10589             </actions>
10590         </permacrud>
10591     </class>
10592
10593     <class
10594         id="uvus"
10595         controller="open-ils.cstore open-ils.pcrud"
10596         oils_obj:fieldmapper="url_verify::url_selector"
10597         oils_persist:tablename="url_verify.url_selector"
10598         reporter:label="URL Verification URL Selector"
10599     >
10600         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10601             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10602             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10603                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10604             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10605         </fields>
10606
10607         <links>
10608             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10609             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10610         </links>
10611
10612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10613             <actions>
10614                 <create permission="URL_VERIFY">
10615                     <context link="session" field="owning_lib"/>
10616                 </create>
10617                 <retrieve permission="URL_VERIFY">
10618                     <context link="session" field="owning_lib"/>
10619                 </retrieve>
10620                 <update permission="URL_VERIFY">
10621                     <context link="session" field="owning_lib"/>
10622                 </update>
10623                 <delete permission="URL_VERIFY">
10624                     <context link="session" field="owning_lib"/>
10625                 </delete>
10626             </actions>
10627         </permacrud>
10628
10629     </class>
10630
10631     <class
10632         id="uvu"
10633         controller="open-ils.cstore open-ils.pcrud"
10634         oils_obj:fieldmapper="url_verify::url"
10635         oils_persist:tablename="url_verify.url"
10636         reporter:label="URL Verification URL"
10637     >
10638         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10639             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10640                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10641                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10642                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10643                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10644             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10645             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10646             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10647             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10648             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10649             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10650             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10651             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10652             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10653             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10654             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10655             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10656             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10657         </fields>
10658
10659         <links>
10660             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10661             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10662             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10663             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10664             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10665         </links>
10666
10667         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10668             <actions>
10669                 <create permission="URL_VERIFY">
10670                     <context link="session" field="owning_lib"/>
10671                 </create>
10672                 <retrieve permission="URL_VERIFY">
10673                     <context link="session" field="owning_lib"/>
10674                 </retrieve>
10675                 <update permission="URL_VERIFY">
10676                     <context link="session" field="owning_lib"/>
10677                 </update>
10678                 <delete permission="URL_VERIFY">
10679                     <context link="session" field="owning_lib"/>
10680                 </delete>
10681             </actions>
10682         </permacrud>
10683
10684     </class>
10685
10686     <class
10687         id="uvva"
10688         controller="open-ils.cstore open-ils.pcrud"
10689         oils_obj:fieldmapper="url_verify::verification_attempt"
10690         oils_persist:tablename="url_verify.verification_attempt"
10691         reporter:label="URL Verification Attempt"
10692     >
10693         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10694             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10695                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10696                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10697             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10698             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10699         </fields>
10700
10701         <links>
10702             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10703             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10704         </links>
10705
10706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10707             <actions>
10708                 <create permission="URL_VERIFY">
10709                     <context link="session" field="owning_lib"/>
10710                 </create>
10711                 <retrieve permission="URL_VERIFY">
10712                     <context link="session" field="owning_lib"/>
10713                 </retrieve>
10714                 <update permission="URL_VERIFY">
10715                     <context link="session" field="owning_lib"/>
10716                 </update>
10717                 <delete permission="URL_VERIFY">
10718                     <context link="session" field="owning_lib"/>
10719                 </delete>
10720             </actions>
10721         </permacrud>
10722
10723     </class>
10724
10725     <class
10726         id="uvuv"
10727         controller="open-ils.cstore open-ils.pcrud"
10728         oils_obj:fieldmapper="url_verify::url_verification"
10729         oils_persist:tablename="url_verify.url_verification"
10730         reporter:label="URL Verification"
10731     >
10732         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10733             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10734                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10735                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10736             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10737             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10738             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10739             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10740                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10741         </fields>
10742
10743         <links>
10744             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10745             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10746             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10747         </links>
10748
10749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10750             <actions>
10751                 <create permission="URL_VERIFY">
10752                     <context link="attempt" jump="session" field="owning_lib"/>
10753                 </create>
10754                 <retrieve permission="URL_VERIFY">
10755                     <context link="attempt" jump="session" field="owning_lib"/>
10756                 </retrieve>
10757                 <update permission="URL_VERIFY">
10758                     <context link="attempt" jump="session" field="owning_lib"/>
10759                 </update>
10760                 <delete permission="URL_VERIFY">
10761                     <context link="attempt" jump="session" field="owning_lib"/>
10762                 </delete>
10763             </actions>
10764         </permacrud>
10765
10766     </class>
10767
10768         <class
10769                 id="cfdi"
10770                 controller="open-ils.cstore open-ils.pcrud"
10771                 oils_obj:fieldmapper="config::filter_dialog_interface"
10772                 oils_persist:tablename="config.filter_dialog_interface"
10773                 reporter:label="FilterDialog Interface">
10774                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10775                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10776                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10777                 </fields>
10778                 <links>
10779                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10780                 </links>
10781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10782                         <actions>
10783                                 <retrieve />
10784                         </actions>
10785                 </permacrud>
10786         </class>
10787
10788         <class
10789                 id="cfdfs"
10790                 controller="open-ils.cstore open-ils.pcrud"
10791                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10792                 oils_persist:tablename="config.filter_dialog_filter_set"
10793                 reporter:label="FilterDialog Filter Set">
10794                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10795                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10796                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10797                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10798                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10799                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10800                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10801                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10802                 </fields>
10803                 <links>
10804                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10805                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10806                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10807                 </links>
10808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10809                         <actions>
10810                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10811                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10812                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10813                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10814                         </actions>
10815                 </permacrud>
10816
10817         </class>
10818
10819         <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">
10820                 <fields oils_persist:primary="code">
10821                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10822                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10823                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10824                 </fields>
10825                 <links/>
10826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10827                         <actions>
10828                                 <retrieve/>
10829                         </actions>
10830                 </permacrud>
10831         </class>
10832
10833         <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">
10834                 <oils_persist:source_definition>
10835
10836             SELECT  b.id,
10837                     MAX(dcp.edit_date) AS last_delete_date
10838              FROM   biblio.record_entry b
10839                     JOIN asset.call_number cn ON (cn.record = b.id)
10840                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10841              WHERE  NOT b.deleted
10842              GROUP BY b.id
10843              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10844
10845                 </oils_persist:source_definition>
10846                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10847                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10848                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10849                 </fields>
10850                 <links>
10851                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10852                 </links>
10853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10854                         <actions>
10855                                 <retrieve/>
10856                         </actions>
10857                 </permacrud>
10858         </class>
10859
10860         <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">
10861                 <oils_persist:source_definition>
10862
10863             -- -- 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.
10864             -- -- 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
10865             -- -- may not.
10866             -- SELECT
10867             --     bre.id AS bib_id,
10868             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10869             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10870             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10871             -- FROM (
10872                 SELECT
10873                     y.bre AS id,
10874                     COALESCE( x.copy_count, 0 ) AS copy_count,
10875                     y.hold_count AS hold_count,
10876                     (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
10877                 FROM (
10878                         SELECT
10879                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10880                             COUNT(*) AS hold_count
10881                         FROM action.hold_request h
10882                         WHERE
10883                             cancel_time IS NULL
10884                             AND fulfillment_time IS NULL
10885                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10886                         GROUP BY 1
10887                     )y LEFT JOIN (
10888                         SELECT 
10889                             (SELECT id
10890                                 FROM biblio.record_entry 
10891                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10892                             ) AS bre, 
10893                             COUNT(*) AS copy_count
10894                         FROM asset.copy
10895                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10896                         WHERE copy.holdable 
10897                             AND NOT copy.deleted 
10898                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10899                         GROUP BY 1
10900                     )x ON x.bre = y.bre
10901                 -- )z RIGHT JOIN (
10902                 --     SELECT id
10903                 --     FROM biblio.record_entry
10904                 --     WHERE NOT deleted
10905                 -- )bre ON (z.bib_id = bre.id)
10906                 
10907
10908                 </oils_persist:source_definition>
10909                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10910                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10911                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10912                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10913                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10914                 </fields>
10915                 <links>
10916                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10917                 </links>
10918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10919                         <actions>
10920                                 <retrieve/>
10921                         </actions>
10922                 </permacrud>
10923         </class>
10924
10925         <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">
10926                 <oils_persist:source_definition>
10927             SELECT *,
10928                 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,
10929                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10930             FROM
10931                 (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
10932                     FROM
10933                         action.hold_request ahr
10934                         JOIN reporter.hold_request_record rhrr USING (id)
10935                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10936                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10937                     WHERE
10938                         ahr.cancel_time IS NULL
10939                         AND ahr.fulfillment_time IS NULL
10940                     GROUP BY bib_record, pickup_lib
10941                 )x
10942                 JOIN
10943                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10944                     FROM
10945                         action.hold_request ahr
10946                         JOIN reporter.hold_request_record rhrr USING (id)
10947                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10948                     WHERE
10949                         ahr.cancel_time IS NULL
10950                         AND ahr.fulfillment_time IS NULL
10951                     GROUP BY bib_record
10952                 )y
10953                 USING (id)
10954                 </oils_persist:source_definition>
10955                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10956                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10957                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10958                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10959                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10960                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10961                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10962                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10963                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10964                 </fields>
10965                 <links>
10966                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10967                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10968                 </links>
10969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10970                         <actions>
10971                                 <retrieve/>
10972                         </actions>
10973                 </permacrud>
10974         </class>
10975
10976         <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) ">
10977                 <oils_persist:source_definition>
10978             WITH counts_at_ou AS (
10979                 SELECT  rhrr.bib_record AS id,
10980                         aou.id AS pickup_lib_or_desc,
10981                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
10982                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
10983                   FROM  actor.org_unit aou
10984                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
10985                         action.hold_request ahr
10986                         JOIN reporter.hold_request_record rhrr USING (id)
10987                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10988                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
10989                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
10990                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
10991                         AND (actor.org_unit_ancestor_at_depth(ahr.pickup_lib,aout.depth)).id = (actor.org_unit_ancestor_at_depth(ac.circ_lib,aout.depth)).id
10992                   GROUP BY 1, 2
10993             )
10994             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
10995                    y.holds_everywhere, y.copy_count_everywhere,
10996                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE x.holds_at_or_below::FLOAT/x.copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
10997                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
10998             FROM counts_at_ou x
10999                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11000                     FROM
11001                         action.hold_request ahr
11002                         JOIN reporter.hold_request_record rhrr USING (id)
11003                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11004                     WHERE
11005                         ahr.cancel_time IS NULL
11006                         AND ahr.fulfillment_time IS NULL
11007                     GROUP BY bib_record
11008                 )y
11009                 USING (id)
11010                 </oils_persist:source_definition>
11011                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11012                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11013                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11014                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11015                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11016                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11017                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11018                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11019                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11020                 </fields>
11021                 <links>
11022                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11023                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11024                 </links>
11025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11026                         <actions>
11027                                 <retrieve/>
11028                         </actions>
11029                 </permacrud>
11030         </class>
11031
11032         <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">
11033                 <oils_persist:source_definition>
11034             SELECT
11035                 ac.id,
11036                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11037                 MAX(actac.xact_start) AS last_circ
11038             FROM asset.copy ac
11039                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11040             GROUP BY ac.id
11041
11042             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11043             --SELECT
11044             --    ac.id,
11045             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11046             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11047             --FROM asset.copy ac
11048             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11049             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11050             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11051                 </oils_persist:source_definition>
11052                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11053                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11054                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11055                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11056                 </fields>
11057                 <links>
11058                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11059                 </links>
11060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11061                         <actions>
11062                                 <retrieve/>
11063                         </actions>
11064                 </permacrud>
11065         </class>
11066
11067         <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">
11068                 <fields oils_persist:primary="id">
11069                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11070                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11071                 </fields>
11072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11073                         <actions>
11074                                 <retrieve/>
11075                         </actions>
11076                 </permacrud>
11077         </class>
11078
11079         <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">
11080                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11081                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11082                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11083                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11084                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11085                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11086                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11087                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11088                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11089                 </fields>
11090                 <links>
11091                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11092                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11093                 </links>
11094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11095                         <actions>
11096                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11097                                 <retrieve/>
11098                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11099                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11100                         </actions>
11101                 </permacrud>
11102         </class>
11103
11104         <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">
11105                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11106                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11107                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11108                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11109                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11110                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11111                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11112                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11113                 </fields>
11114                 <links>
11115                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11116                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11117                 </links>
11118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11119                         <actions>
11120                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11121                                 <retrieve/>
11122                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11123                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11124                         </actions>
11125                 </permacrud>
11126         </class>
11127
11128
11129         <!-- ********************************************************************************************************************* -->
11130         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11131         <!-- ********************************************************************************************************************* -->
11132         <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">
11133                 <fields oils_persist:primary="id">
11134                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11135                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11136                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11137                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11138                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11139                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11140                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11141                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11142                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11143                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11144                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11145                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11146                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11147                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11148                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11149                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11150                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11151                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11152                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11153                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11154                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11155                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11156                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11157                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11158                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11159                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11160                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11161                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11162                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11163                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11164                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11165                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11166                 </fields>
11167                 <links>
11168                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11169                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11170                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11171                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11172                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11173                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11174                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11175                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11176                 </links>
11177         </class>
11178
11179         <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">
11180                 <fields oils_persist:primary="id">
11181                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11182                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11183                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11184                 </fields>
11185                 <links>
11186                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11187                 </links>
11188         </class>
11189
11190         <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">
11191                 <fields oils_persist:primary="id">
11192                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11193                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11194                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11195                 </fields>
11196                 <links>
11197                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11198                 </links>
11199         </class>
11200
11201         <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">
11202                 <fields oils_persist:primary="id">
11203                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11204
11205                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11206                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11207                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11208
11209                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11210                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11211                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11212
11213                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11214                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11215
11216                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11217                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11218                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11219
11220                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11221                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11222
11223                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11224                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11225                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11226
11227                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11228                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11229                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11230
11231                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11232                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11233                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11234                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11235
11236                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11237                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11238
11239                 </fields>
11240                 <links>
11241                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11242                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11243                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11244                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11245                 </links>
11246         </class>
11247
11248         <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">
11249                 <oils_persist:source_definition>
11250
11251             SELECT
11252                 po.ordering_agency AS ordering_agency,
11253                 po.id AS purchase_order,
11254                 li.id AS lineitem,
11255                 lid.id AS lineitem_detail,
11256                 cpa.id AS claim_policy_action
11257             FROM
11258                 acq.lineitem_detail lid
11259                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11260                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11261                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11262                 JOIN acq.claim_policy_action cpa ON (
11263                     cpa.claim_policy = cp.id
11264
11265                     -- we only care about claim policy actions whose claim
11266                     -- interval we'd reached or exceeded
11267                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11268
11269                     -- filter out all claim policy actions where claim events
11270                     -- have occurred on or after the action's action_interval
11271                     AND NOT EXISTS (
11272                         SELECT 1
11273                         FROM
11274                             acq.claim_event evt
11275                             JOIN acq.claim claim ON (
11276                                 claim.id = evt.claim
11277                                 AND claim.lineitem_detail = lid.id
11278                             )
11279                         WHERE
11280                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11281                     )
11282                 )
11283             WHERE
11284                 lid.cancel_reason IS NULL
11285                 AND li.cancel_reason IS NULL -- belt/suspenders
11286                 AND po.cancel_reason IS NULL -- belt/suspenders
11287                 AND lid.recv_time IS NULL
11288                 AND po.state = 'on-order'
11289             ORDER BY 1, 2, 3, 4, 5
11290
11291                 </oils_persist:source_definition>
11292                 <fields>
11293                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11294                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11295                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11296                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11297                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11298                 </fields>
11299                 <links>
11300                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11301                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11302                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11303                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11304                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11305                 </links>
11306         </class>
11307         <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">
11308                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11309                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11310                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11311                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11312                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11313                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11314                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11315                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11316                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11317                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11318                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11319                 </fields>
11320                 <links>
11321                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11322                 </links>
11323     </class>
11324         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11325                 <oils_persist:source_definition>
11326             SELECT * FROM acq.lineitem_summary 
11327                                 WHERE item_count > (invoice_count + cancel_count)
11328         </oils_persist:source_definition>
11329                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11330                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11331                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11332                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11333                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11334                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11335                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11336                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11337                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11338                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11339                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11340                 </fields>
11341                 <links>
11342                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11343                 </links>
11344     </class>
11345         <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">
11346                 <oils_persist:source_definition>
11347
11348                         SELECT  t.*
11349                           FROM  action.transit_copy t
11350                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11351                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11352                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11353
11354                 </oils_persist:source_definition>
11355                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11356                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11357                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11358                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11359                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11360                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11361                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11362                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11365                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11366                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11367                 </fields>
11368                 <links>
11369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11371                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11372                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11373                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11374                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11375                 </links>
11376         </class>
11377
11378     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11379                 <oils_persist:source_definition>
11380
11381         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11382                 SELECT
11383                         cp.id as copy,
11384                         COUNT(circ.id),
11385                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11386                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11387                 FROM
11388                         asset.copy cp
11389                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11390                 GROUP BY 1, 3, 4
11391                 UNION ALL
11392                 SELECT
11393                         cp.id as copy,
11394                         COUNT(circ.id),
11395                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11396                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11397                 FROM
11398                         asset.copy cp
11399                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11400                 GROUP BY 1, 3, 4
11401                 UNION ALL
11402                 SELECT
11403                         id as copy,
11404                         circ_count,
11405                         -1 AS year,
11406                         false as is_renewal
11407                 FROM
11408                         extend_reporter.legacy_circ_count
11409         )x GROUP BY 1, 3, 4
11410
11411                 </oils_persist:source_definition>
11412         <fields>
11413             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11414             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11415             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11416             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11417         </fields>
11418                 <links>
11419                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11420                 </links>
11421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11422                         <actions>
11423                                 <retrieve/>
11424                         </actions>
11425                 </permacrud>
11426     </class>
11427
11428         <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">
11429                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11430                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11431                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11432                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11433                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11434                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11435                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11436                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11437                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11438                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11439                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11440                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11441                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11442                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11443                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11444                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11445                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11446                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11447                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11448                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11449                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11450                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11451                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11452                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11453                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11454                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11455                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11456                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11457                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11458                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11459                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11460                 </fields>
11461                 <links>
11462                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11463                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11464                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11465                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11466                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11467                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11468                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11469                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11470                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11471                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11472                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11473                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11474                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11475                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11476                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11477                 </links>
11478         </class>
11479
11480     <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">
11481         <fields oils_persist:primary="id">
11482             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11483             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11484             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11485             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11486             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11487             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11488             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11489             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11490             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11491             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11492             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11493             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11494             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11495             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11496             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11497             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11498             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11499             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11500             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11501             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11502             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11503             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11504             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11505             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11506             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11507             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11508             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11509             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11510             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11511             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11512             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11513             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11514             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11515             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11516         </fields>
11517         <links>
11518             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11519             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11520             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11521             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11522             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11523             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11524             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11525             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11526         </links>
11527     </class>
11528
11529     <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">
11530         <fields oils_persist:primary="id">
11531             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11532             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11533             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11534             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11535         </fields>
11536         <links>
11537             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11538             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11539         </links>
11540     </class>
11541
11542     <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">
11543         <fields oils_persist:primary="owning_lib">
11544             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11545             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11546             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11547         </fields>
11548         <links>
11549             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11550         </links>
11551     </class>
11552
11553     <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">
11554         <fields oils_persist:primary="id">
11555             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11556             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11557             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11558             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11559             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11560         </fields>
11561         <links>
11562             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11563             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11564             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11565         </links>
11566     </class>
11567
11568     <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">
11569         <fields oils_persist:primary="circ_lib">
11570             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11571             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11572             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11573             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11574         </fields>
11575         <links>
11576             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11577             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11578         </links>
11579     </class>
11580
11581     <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">
11582         <fields oils_persist:primary="id">
11583             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11584             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11585             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11586             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11587             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11588         </fields>
11589         <links>
11590             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11591             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11592             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11593         </links>
11594     </class>
11595
11596     <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">
11597         <fields oils_persist:primary="home_ou">
11598             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11599             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11600             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11601             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11602         </fields>
11603         <links>
11604             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11605             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11606         </links>
11607     </class>
11608         <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">
11609                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11610                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11611                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11612                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11613                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11614                 </fields>
11615                 <links>
11616                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11617                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11618                 </links>
11619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11620                         <actions>
11621                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11622                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11623                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11624                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11625                         </actions>
11626                 </permacrud>
11627         </class>
11628         <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">
11629                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11630                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11631                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11632                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11633                 </fields>
11634                 <links>
11635                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11636                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11637                         </links>
11638                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11639                 <actions>
11640                                 <create permission="ADMIN_ACQ_FUND_TAG">
11641                                         <context link="tag" field="owner"/>
11642                                 </create>
11643                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11644                                         <context link="tag" field="owner"/>
11645                                 </retrieve>
11646                                 <update permission="ADMIN_ACQ_FUND_TAG">
11647                                         <context link="tag" field="owner"/>
11648                                 </update>
11649                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11650                                         <context link="tag" field="owner"/>
11651                                 </delete>
11652                         </actions>
11653                 </permacrud>
11654         </class>
11655         <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">
11656                 <oils_persist:source_definition><![CDATA[
11657                 SELECT
11658                         poi.purchase_order AS purchase_order,
11659                         ii.invoice AS invoice,
11660                         NULL AS lineitem,
11661                         poi.id AS po_item,
11662                         NULL AS picklist
11663                 FROM
11664                         acq.po_item poi
11665                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11666                 UNION SELECT
11667                         jub.purchase_order AS purchase_order,
11668                         ie.invoice AS invoice,
11669                         jub.id AS lineitem,
11670                         NULL AS po_item,
11671                         jub.picklist AS picklist
11672                 FROM
11673                         acq.lineitem jub
11674                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11675                 UNION SELECT
11676                         ii.purchase_order AS purchase_order,
11677                         ii.invoice AS invoice,
11678                         NULL AS lineitem,
11679                         NULL AS po_item,
11680                         NULL AS picklist
11681                 FROM
11682                         acq.invoice_item ii
11683                 WHERE ii.po_item IS NULL
11684                 UNION SELECT
11685                         ie.purchase_order AS purchase_order,
11686                         ie.invoice AS invoice,
11687                         NULL AS lineitem,
11688                         NULL AS po_item,
11689                         NULL AS picklist
11690                 FROM
11691                         acq.invoice_entry ie
11692                 WHERE ie.lineitem IS NULL
11693                 UNION SELECT
11694                         NULL AS purchase_order,
11695                         NULL AS invoice,
11696                         jub.id AS lineitem,
11697                         NULL AS po_item,
11698                         jub.picklist AS picklist
11699                 FROM
11700                         acq.lineitem jub
11701                 WHERE jub.purchase_order IS NULL
11702                 ]]></oils_persist:source_definition>
11703                 <fields>
11704                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11705                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11706                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11707                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11708                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11709                 </fields>
11710                 <links>
11711                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11712                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11713                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11714                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11715                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11716                 </links>
11717         </class>
11718         <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">
11719                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11720                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11721                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11722                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11723                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11724                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11725                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11726                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11727                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11728                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11729                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11730                 </fields>
11731                 <links>
11732                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11733                 </links>
11734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11735                         <actions>
11736                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11737                                 <retrieve/>
11738                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11739                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11740                         </actions>
11741                 </permacrud>
11742         </class>
11743
11744         <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">
11745                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11746                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11747                         <field name="date_applied" reporter:datatype="timestamp"/>
11748                         <field name="org" reporter:datatype="org_unit"/>
11749                         <field name="original_value" reporter:datatype="text"/>
11750                         <field name="new_value" reporter:datatype="text"/>
11751                         <field name="field_name" reporter:datatype="link"/>
11752                 </fields>
11753                 <links>
11754                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11755                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11756                 </links>
11757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11758                         <actions>
11759                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11760                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11761                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11762                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11763                         </actions>
11764                 </permacrud>
11765         </class>
11766         <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">
11767                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11768                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11769                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11770                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11771                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11772                 </fields>
11773                 <links>
11774                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11775                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11776                 </links>
11777         </class>
11778         <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">
11779                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11780                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11781                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11782                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11783                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11784                 </fields>
11785                 <links>
11786                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11787                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11788                 </links>
11789         </class>
11790         <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">
11791                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11792                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
11793                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11794                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11795                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11796                 </fields>
11797                 <links>
11798                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11799                 </links>
11800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11801                         <actions>
11802                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11803                                 <retrieve/>
11804                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11805                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11806                         </actions>
11807                 </permacrud>
11808         </class>
11809         <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">
11810                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11811                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11812                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11813                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11814                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11815                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11816                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11817                 </fields>
11818                 <links>
11819                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11820                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11821                 </links>
11822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11823                         <actions>
11824                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11825                                 <retrieve/>
11826                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11827                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11828                         </actions>
11829                 </permacrud>
11830         </class>
11831         <class id="cctt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_tag_type" oils_persist:tablename="config.copy_tag_type" reporter:label="Copy Tag Types" oils_persist:field_safe="true">
11832                 <fields oils_persist:primary="code">
11833                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
11834                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
11835                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11836                 </fields>
11837                 <links>
11838                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11839                 </links>
11840                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11841                         <actions>
11842                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11843                                 <retrieve/>
11844                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11845                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11846                         </actions>
11847                 </permacrud>
11848         </class>
11849         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
11850                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
11851                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11852                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
11853                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11854                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11855                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
11856                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
11857                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11858                 </fields>
11859                 <links>
11860                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
11861                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11862                 </links>
11863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11864                         <actions>
11865                                 <create permission="ADMIN_COPY_TAGS" context_field="owner"/>
11866                                 <retrieve/>
11867                                 <update permission="ADMIN_COPY_TAGS" context_field="owner"/>
11868                                 <delete permission="ADMIN_COPY_TAGS" context_field="owner"/>
11869                         </actions>
11870                 </permacrud>
11871         </class>
11872         <class id="acptcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag_copy_map" oils_persist:tablename="asset.copy_tag_copy_map" reporter:label="Copy Tag Copy Map" oils_persist:field_safe="true">
11873                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
11874                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11875                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
11876                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
11877                 </fields>
11878                 <links>
11879                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11880                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
11881                 </links>
11882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11883                         <actions>
11884                                 <create permission="UPDATE_COPY">
11885                     <context link="copy" field="circ_lib"/>
11886                 </create>
11887                                 <retrieve/>
11888                                 <update permission="UPDATE_COPY">
11889                     <context link="copy" field="circ_lib"/>
11890                 </update>
11891                                 <delete permission="UPDATE_COPY">
11892                     <context link="copy" field="circ_lib"/>
11893                 </delete>
11894                         </actions>
11895                 </permacrud>
11896         </class>
11897         <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">
11898         <oils_persist:source_definition>
11899         SELECT ahcm.target_copy AS id,count(*) AS count
11900          FROM
11901          action.hold_request ahr,
11902          action.hold_copy_map ahcm
11903          WHERE
11904          ahr.cancel_time IS NULL AND
11905          ahr.fulfillment_time IS NULL AND
11906          ahr.capture_time IS NULL AND
11907          ahr.id = ahcm.hold
11908          GROUP BY ahcm.target_copy
11909         </oils_persist:source_definition>
11910         <fields oils_persist:primary="id">
11911             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11912             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11913         </fields>
11914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11915             <actions>
11916                <retrieve/>
11917             </actions>
11918         </permacrud>
11919         </class>
11920
11921         <!-- ********************************************************************************************************************* -->
11922
11923 </IDL>
11924
11925 <!--
11926     vim:noet:ts=4:sw=4:
11927 -->